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 0D7583A56D8 for ; Thu, 2 Dec 2004 02:15:23 +0000 (GMT) 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 47244-09 for ; Thu, 2 Dec 2004 02:15:17 +0000 (GMT) Received: from www.postgresql.com (unknown [200.46.204.209]) by svr1.postgresql.org (Postfix) with ESMTP id C757E3A5624 for ; Thu, 2 Dec 2004 02:15:01 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by www.postgresql.com (Postfix) with ESMTP id 55D5E738A49 for ; Wed, 1 Dec 2004 20:10:23 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id iB1K6w0I018428; Wed, 1 Dec 2004 15:06:58 -0500 (EST) To: Brian Hirt Cc: "'Postgresql Performance'" Subject: Re: query with timestamp not using index In-reply-to: <95241C28-43B8-11D9-AD0F-000D93AD2E74@mobygames.com> References: <95241C28-43B8-11D9-AD0F-000D93AD2E74@mobygames.com> Comments: In-reply-to Brian Hirt message dated "Wed, 01 Dec 2004 09:46:43 -0700" Date: Wed, 01 Dec 2004 15:06:58 -0500 Message-ID: <18427.1101931618@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200412/31 X-Sequence-Number: 9406 Brian Hirt writes: > select count(*) from redir_log > where redir_timestamp >= '10/14/2004'::timestamp without time zone at time zone 'GMT'; That seems like the hard way to express a timestamp constant. Why not select count(*) from redir_log where redir_timestamp >= '10/14/2004 00:00 GMT'; (FWIW, though, the AT TIME ZONE construct *should* have been collapsed to a constant; 8.0 fixes this.) regards, tom lane