Re: NOW vs CURRENT_DATE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: smime.p7s
Description: S/MIME Cryptographic Signature


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux