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 4773C32A615 for ; Fri, 1 Oct 2004 17:30:07 +0100 (BST) 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 65788-03 for ; Fri, 1 Oct 2004 16:30:01 +0000 (GMT) Received: from davinci.ethosmedia.com (server226.ethosmedia.com [209.128.84.226]) by svr1.postgresql.org (Postfix) with ESMTP id 7555132A60B for ; Fri, 1 Oct 2004 17:30:01 +0100 (BST) Received: from [63.195.55.98] (account josh@agliodbs.com HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 6441602; Fri, 01 Oct 2004 09:31:22 -0700 From: Josh Berkus Organization: Aglio Database Solutions To: Tom Lane Subject: Re: inconsistent/weird index usage Date: Fri, 1 Oct 2004 09:29:36 -0700 User-Agent: KMail/1.6.2 Cc: Dustin Sallings , pgsql-performance@postgresql.org References: <6FA9AB99-1373-11D9-A87D-000A957659CC@spy.net> <9345.1096641526@sss.pgh.pa.us> In-Reply-To: <9345.1096641526@sss.pgh.pa.us> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <200410010929.36026.josh@agliodbs.com> 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: 200410/8 X-Sequence-Number: 8484 Tom, > Most of the problem here comes from the fact that "current_date - 7" > isn't reducible to a constant and so the planner is making bad guesses > about how much of each table will be scanned. I thought this was fixed in 7.4. No? -- Josh Berkus Aglio Database Solutions San Francisco