Hello all

Are these two queries exactly eqivalent? The table is partitioned on r_time, 
which is a timestamptz. The explain plans are not 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


Reply via email to