Re: NOW vs CURRENT_DATE - Mailing list pgsql-performance

From Tino Wildenhain
Subject Re: NOW vs CURRENT_DATE
Date
Msg-id 48B24ACB.8010906@wildenhain.de
Whole thread Raw
In response to NOW vs CURRENT_DATE  (dforum <dforums@vieonet.com>)
List pgsql-performance
Hi,

dforum wrote:
> Hello every body,
>
> I just discover a big not only big huge difference between NOW() and
> CURRENT_DATE.
>
> Did you already know about it and do you know why ?
>
> DELETE FROM blacklist where bl_date < (NOW() - interval '2 DAY');
> on 6 000 000 of records
> 699 ms
>
> DELETE FROM blacklist where bl_date < (CURRENT_DATE - interval '2 DAY');
> on 6 000 000 of records

Try that with a timestamp - column and use now() and current_timestamp
with a long running query and then compare min(column) max(column) in
both cases :-)

Regards
Tino

Attachment

pgsql-performance by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Identifying the nature of blocking I/O
Next
From: "Alexander Staubo"
Date:
Subject: Re: Identifying the nature of blocking I/O