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 199FC32A2BA for ; Fri, 1 Oct 2004 17:34:24 +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 68003-02 for ; Fri, 1 Oct 2004 16:34:18 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 43B6432A2D6 for ; Fri, 1 Oct 2004 17:34:17 +0100 (BST) 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 i91GYFqS010776; Fri, 1 Oct 2004 12:34:15 -0400 (EDT) To: Josh Berkus Cc: Dustin Sallings , pgsql-performance@postgresql.org Subject: Re: inconsistent/weird index usage In-reply-to: <200410010929.36026.josh@agliodbs.com> References: <6FA9AB99-1373-11D9-A87D-000A957659CC@spy.net> <9345.1096641526@sss.pgh.pa.us> <200410010929.36026.josh@agliodbs.com> Comments: In-reply-to Josh Berkus message dated "Fri, 01 Oct 2004 09:29:36 -0700" Date: Fri, 01 Oct 2004 12:34:15 -0400 Message-ID: <10775.1096648455@sss.pgh.pa.us> From: Tom Lane 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/9 X-Sequence-Number: 8485 Josh Berkus writes: >> 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? No. It's not fixed as of CVS tip either, although there was some talk of doing something in time for 8.0. regards, tom lane