X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BA13F52833 for ; Wed, 22 Jun 2005 05:39:34 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 58569-04 for ; Wed, 22 Jun 2005 08:39:25 +0000 (GMT) Received: from exobox.exoweb.net (unknown [221.122.43.98]) by svr1.postgresql.org (Postfix) with SMTP id 75ABD52800 for ; Wed, 22 Jun 2005 05:39:21 -0300 (ADT) Received: (qmail 29397 invoked from network); 22 Jun 2005 08:39:22 -0000 Received: from exo185.exoweb.net (HELO tobias.nordicbet.invalid) (192.168.0.185) by 0 with SMTP; 22 Jun 2005 08:39:22 -0000 Received: by tobias.nordicbet.invalid (Postfix, from userid 500) id A6700E0D07; Wed, 22 Jun 2005 16:39:21 +0800 (CST) Date: Wed, 22 Jun 2005 16:39:21 +0800 From: Tobias Brox To: Kjell Tore Fossbakk Cc: Tobias Brox , pgsql-performance@postgresql.org Subject: Re: Querying 19million records very slowly Message-ID: <20050622083921.GZ7839@tobias> References: <42B8719A.6040809@refractions.net> <20050622080357.GW7839@tobias> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Group Nordicbet User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200506/427 X-Sequence-Number: 13064 [Kjell Tore Fossbakk - Wed at 10:18:30AM +0200] > I'll test the use of current_timestamp, rather than now(). I am not > sure if Pg can do a match between a fixed timestamp and a datetime? I have almost all my experience with timestamps wo timezones, but ... isn't that almost the same as the timedate type? > time > current_timestamp - interval '24 hours', > when time is yyyy-mm-dd hh-mm-ss+02, like 2005-06-22 16:00:00+02. Try to type in '2005-06-21 16:36:22+08' directly in the query, and see if it makes changes. Or probably '2005-06-21 10:36:22+02' in your case ;-) (btw, does postgresql really handles timezones? '+02' is quite different from 'CET', which will be obvious sometime in the late autoumn...) -- Tobias Brox, +86-13521622905 Nordicbet, IT dept