X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 2B3969DCAAC for ; Mon, 5 Dec 2005 11:11:45 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 71669-04 for ; Mon, 5 Dec 2005 11:11:44 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id C4C7D9DCD64 for ; Mon, 5 Dec 2005 11:11:37 -0400 (AST) 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 jB5FBfC7029617; Mon, 5 Dec 2005 10:11:41 -0500 (EST) To: "Markus Wollny" cc: pgsql-performance@postgresql.org Subject: Re: Queries taking ages in PG 8.1, have been much faster in PG<=8.0 In-reply-to: <28011CD60FB1724DBA4442E38277F6264A6BD5@hermes.computec.de> References: <28011CD60FB1724DBA4442E38277F6264A6BD5@hermes.computec.de> Comments: In-reply-to "Markus Wollny" message dated "Mon, 05 Dec 2005 15:44:54 +0100" Date: Mon, 05 Dec 2005 10:11:41 -0500 Message-ID: <29616.1133795501@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.012 required=5 tests=[AWL=0.012] X-Spam-Score: 0.012 X-Spam-Level: X-Archive-Number: 200512/125 X-Sequence-Number: 15946 "Markus Wollny" writes: >> Could we see the pg_stats row for answer.session_id in both >> 8.0 and 8.1? > Here you are: > 8.1: > Correlation -0.0736492 > 8.0.3: > Correlation -0.237136 Interesting --- if the 8.1 database is a dump and restore of the 8.0, you'd expect the physical ordering to be similar. Why is 8.1 showing a significantly lower correlation? That has considerable impact on the estimated cost of an indexscan (plain not bitmap), and so it might explain why 8.1 is mistakenly avoiding the indexscan ... regards, tom lane