Received: from bast.unixathome.org (bast.unixathome.org [216.187.105.150]) by postgresql.org (Postfix) with ESMTP id 447F74758D8 for ; Wed, 10 Apr 2002 09:07:03 -0400 (EDT) Received: from wocker (wocker.unixathome.org [192.168.0.99]) by bast.unixathome.org (Postfix) with ESMTP id C869D3F30; Wed, 10 Apr 2002 09:07:43 -0400 (EDT) From: "Dan Langille" Organization: DVL Software Limited To: "Gaetano Mendola" Date: Wed, 10 Apr 2002 09:06:55 -0400 MIME-Version: 1.0 Subject: Re: Timestamps and performances problems Reply-To: dan@langille.org Cc: pgsql-admin@postgresql.org In-reply-to: <004101c1e075$49103940$5ce8fea9@GMENDOLA2> X-mailer: Pegasus Mail for Windows (v4.01) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Message-Id: <20020410130743.C869D3F30@bast.unixathome.org> X-Archive-Number: 200204/81 X-Sequence-Number: 3969 On 10 Apr 2002 at 11:51, Gaetano Mendola wrote: > "Jean-Christophe ARNU (JX)" wrote: > > Hello all. > > I've a performance problem on specific requests : > > > > When I use timestamps + interval in where clauses, query performance is > > slowed down by a factor of 20 or 30!!!! For exemple : > > select timestamp,value > > from measure > > where timestamp(now() - '1 hour'::interval) Try where timestamp(now() - '1 hour'::interval)::timestemp. -- Dan Langille The FreeBSD Diary - http://freebsddiary.org/ - practical examples