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 C9976D1B764 for ; Mon, 26 Jul 2004 13:02:21 -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 66404-06 for ; Mon, 26 Jul 2004 16:02:12 +0000 (GMT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id A4DE7D1B775 for ; Mon, 26 Jul 2004 13:02:07 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id BF1C9350CC; Mon, 26 Jul 2004 09:02:03 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id BDBAF350C9; Mon, 26 Jul 2004 09:02:03 -0700 (PDT) Date: Mon, 26 Jul 2004 09:02:03 -0700 (PDT) From: Stephan Szabo To: "Harmon S. Nine" Cc: pgsql-performance@postgresql.org Subject: Re: Timestamp-based indexing In-Reply-To: <410519F6.5020806@netarx.com> Message-ID: <20040726085324.E68237@megazone.bigpanda.com> References: <410519F6.5020806@netarx.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/177 X-Sequence-Number: 7568 On Mon, 26 Jul 2004, Harmon S. Nine wrote: > However, we can't get the planner to do an timestamp-based index scan. > > Anyone know what to do? I'd wonder if the type conversion is causing you problems. CURRENT_TIMESTAMP - INTERVAL '10 minutes' is a timestamp with time zone while the column is timestamp without time zone. Casting CURRENT_TIMESTAMP to timestamp without time zone seemed to make it able to choose an index scan on 7.4.