where clauses including timstamptz and intervals

Поиск
Список
Период
Сортировка
От Niels Jespersen
Тема where clauses including timstamptz and intervals
Дата
Msg-id df95450aee764d6fbedaf04613d17508@dst.dk
обсуждение исходный текст
Ответы Re: where clauses including timstamptz and intervals  (hubert depesz lubaczewski <depesz@depesz.com>)
Список pgsql-general
Hello all

Are these two queries exactly eqivalent? The table is partitioned on r_time, which is a timestamptz. The explain plans
arenot exactly the same. The first wants to scan a partition more than the latter.  

select f.xx from f
where f.r_time  >= '2020-10-01 00:00:00+00'::timestamptz
  and f.r_time < ('2020-10-01 00:00:00+00'::timestamptz + interval '1 month');

select f.xx from f
where f.r_time  >= '2020-10-01 00:00:00+00'::timestamptz
  and f.r_time < ('2020-11-01 00:00:00+00'::timestamptz);

Regards Niels Jespersen



В списке pgsql-general по дате отправления:

Предыдущее
От: Yi Sun
Дата:
Сообщение: "index contains unexpected zero page" problem
Следующее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: where clauses including timstamptz and intervals