NOW vs CURRENT_DATE

From: dforum <dforums(at)vieonet(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: NOW vs CURRENT_DATE
Date: 2008-08-24 20:01:55
Message-ID: 48B1BE33.3060505@vieonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

0.065 ms

tx

david

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Carey 2008-08-24 20:59:18 Re: Large number of tables slow insert
Previous Message DiezelMax 2008-08-24 14:42:05 Re: Large number of tables slow insert