X-Original-To: pgsql-sql@postgresql.org Received: from server.beierfeld.kabeljournal.de (pD900DD51.dip.t-dialin.net [217.0.221.81]) by postgresql.org (Postfix) with SMTP id 005C3475FC4 for ; Mon, 10 Mar 2003 04:17:44 -0500 (EST) Received: (qmail 7582 invoked from network); 10 Mar 2003 09:17:44 -0000 Received: from station158.beierfeld.kabeljournal.de (192.168.128.158) by server.beierfeld.kabeljournal.de with SMTP; 10 Mar 2003 09:17:44 -0000 Date: Mon, 10 Mar 2003 10:17:50 +0100 From: Andre Schubert To: Tom Lane Cc: achill@matrix.gatewaynet.com, pgsql-sql@postgresql.org Subject: Re: Help on indexing timestamps Message-Id: <20030310101750.77a1ae2f.andre@km3.de> In-Reply-To: <264.1047049503@sss.pgh.pa.us> References: <20030307130223.5a58c132.andre@km3.de> <20030307134702.135fa254.andre@km3.de> <264.1047049503@sss.pgh.pa.us> Organization: km3 teledienst GmbH X-Mailer: Sylpheed version 0.8.6 (GTK+ 1.2.10; i586-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archive-Number: 200303/236 X-Sequence-Number: 12276 On Fri, 07 Mar 2003 10:05:03 -0500 Tom Lane wrote: > Andre Schubert writes: > > Yes if i use BETWEEN and type in the dates by hand the query takes about 200ms with explain analyze. > > I think these is a good performance. > > But if i use now() instead of manually typed dates the query take about 1400ms :( > > I thought the somebody posted to this list, that now() is a function that is not cached, > > and thatswhy does not work pretty well with indexes. > > Update to 7.3, and that problem will go away. > What is the difference between 7.2 and 7.3 related to my problem ? Thanks, as