Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 1510965019B for ; Sun, 24 Aug 2008 17:03:49 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 38320-04 for ; Sun, 24 Aug 2008 17:03:33 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from 30.mail-out.ovh.net (30.mail-out.ovh.net [213.186.62.213]) by postgresql.org (Postfix) with SMTP id 639B4650030 for ; Sun, 24 Aug 2008 17:03:36 -0300 (ADT) Received: (qmail 5299 invoked by uid 503); 24 Aug 2008 20:03:11 -0000 Received: from b7.ovh.net (HELO mail185.ha.ovh.net) (213.186.33.57) by 30.mail-out.ovh.net with SMTP; 24 Aug 2008 20:03:11 -0000 Received: from b0.ovh.net (HELO queue-out) (213.186.33.50) by b0.ovh.net with SMTP; 24 Aug 2008 20:01:26 -0000 Received: from ita73-2-82-246-12-243.fbx.proxad.net (HELO localhost.localdomain) (dforums@vieonet.com@82.246.12.243) by ns0.ovh.net with SMTP; 24 Aug 2008 20:01:25 -0000 Message-ID: <48B1BE33.3060505@vieonet.com> Date: Sun, 24 Aug 2008 22:01:55 +0200 From: dforum User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: NOW vs CURRENT_DATE Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Ovh-Tracer-Id: 13696853843787892529 X-Ovh-Remote: 82.246.12.243 (ita73-2-82-246-12-243.fbx.proxad.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: DONE|H 0.500185/N X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/307 X-Sequence-Number: 31188 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