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 9E2FC52905 for ; Thu, 21 Jul 2005 14:45:29 -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 35440-02 for ; Thu, 21 Jul 2005 17:45:23 +0000 (GMT) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by svr1.postgresql.org (Postfix) with ESMTP id 1F89E528F9 for ; Thu, 21 Jul 2005 14:45:19 -0300 (ADT) Received: from stark.xeocode.com (stark.xeocode.com [216.58.44.227]) by svr4.postgresql.org (Postfix) with ESMTP id BE25C5AFAE9 for ; Thu, 21 Jul 2005 16:49:15 +0000 (GMT) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1Dve5p-00060p-00; Thu, 21 Jul 2005 12:40:17 -0400 To: John A Meinel Cc: lutzeb@aeccom.com, Richard Huxton , pgsql-performance@postgresql.org Subject: Re: Optimizer seems to be way off, why? References: <42DE6CD5.8070100@aeccom.com> <42DE8375.8020205@archonet.com> <42DEA308.6030608@aeccom.com> <42DEBACF.2020405@arbash-meinel.com> In-Reply-To: <42DEBACF.2020405@arbash-meinel.com> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 21 Jul 2005 12:40:17 -0400 Message-ID: <87vf34cdu6.fsf@stark.xeocode.com> Lines: 16 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 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.004 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/342 X-Sequence-Number: 13583 John A Meinel writes: > Now if you created the index on b(r,c), then it would have a much better > idea of how selective that would be. At the very least, it could index > on (r,c) rather than indexing on (r) and filtering by (c). There has been some discussion of adding functionality like this but afaik no version of Postgres actually does this yet. Adding the index may still help though. -- greg