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 DDDA2569AD for ; Thu, 17 Mar 2005 03:19:16 +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 41783-10 for ; Thu, 17 Mar 2005 03:19:13 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 7DB1856991 for ; Thu, 17 Mar 2005 03:19:12 +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 j2H3JDYD019589; Wed, 16 Mar 2005 22:19:13 -0500 (EST) To: David Brown Cc: Josh Berkus Subject: Re: multi-column index In-reply-to: <4238CE87.1040904@bigpond.net.au> References: <42385A1B.9090305@ibcp.fr> <200503161009.24713.josh@agliodbs.com> <4238CE87.1040904@bigpond.net.au> Comments: In-reply-to David Brown message dated "Thu, 17 Mar 2005 10:25:43 +1000" Date: Wed, 16 Mar 2005 22:19:13 -0500 Message-ID: <19588.1111029553@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/346 X-Sequence-Number: 11051 David Brown writes: > Actually, I'm surprised the planner came up with such a low cost for the > single column index, unless ... perhaps correlation statistics aren't > used when determining costs for multi-column indexes? The correlation calculation for multi-column indexes is pretty whacked out pre-8.0. I don't think it's that great in 8.0 either --- we really need to make ANALYZE calculate the correlation explicitly for each index, probably, rather than trying to use per-column correlations. regards, tom lane