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 ED4809DCAA5 for ; Mon, 5 Dec 2005 10:44:53 -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 61421-09 for ; Mon, 5 Dec 2005 10:44:57 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtpgw.computec.de (smtpgw.computec.de [212.123.108.8]) by postgresql.org (Postfix) with ESMTP id 755049DCAE5 for ; Mon, 5 Dec 2005 10:44:50 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtpgw.computec.de (Postfix) with ESMTP id 78BAA559DB; Mon, 5 Dec 2005 15:44:55 +0100 (CET) Received: from smtpgw.computec.de ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 10357-02-34; Mon, 5 Dec 2005 15:44:55 +0100 (CET) Received: from HERMES.computec.de (unknown [192.168.0.22]) by smtpgw.computec.de (Postfix) with ESMTP id 02CFE559D2; Mon, 5 Dec 2005 15:44:55 +0100 (CET) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: Re: Queries taking ages in PG 8.1, have been much faster in PG<=8.0 Date: Mon, 5 Dec 2005 15:44:54 +0100 Message-ID: <28011CD60FB1724DBA4442E38277F6264A6BD5@hermes.computec.de> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: AW: [PERFORM] Queries taking ages in PG 8.1, have been much faster in PG<=8.0 Thread-Index: AcX5qLBygbWGWsU6Sj6hZyQSta1vmQAAEPgg From: "Markus Wollny" To: "Tom Lane" Cc: X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at computec.de X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.96 required=5 tests=[AWL=-0.960, DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_POST=1.44] X-Spam-Score: 0.96 X-Spam-Level: X-Archive-Number: 200512/123 X-Sequence-Number: 15944 =20 > -----Urspr=FCngliche Nachricht----- > Von: Tom Lane [mailto:tgl@sss.pgh.pa.us]=20 > Gesendet: Montag, 5. Dezember 2005 15:33 > An: Markus Wollny > Cc: pgsql-performance@postgresql.org > Betreff: Re: AW: [PERFORM] Queries taking ages in PG 8.1,=20 > have been much faster in PG<=3D8.0=20 =20 > Could we see the pg_stats row for answer.session_id in both=20 > 8.0 and 8.1? Here you are: select null_frac , avg_width , n_distinct , most_common_vals , most_common_freqs , histogram_bounds , Correlation from pg_stats where schemaname =3D 'survey' and tablename =3D 'answer' and attname =3D 'session_id'; 8.1: null_frac 0 avg_width 4 n_distinct 33513 most_common_vals = {1013854,1017890,1021551,1098817,764249,766938,776353,780954,782232,78598= 5} most_common_freqs = {0.001,0.001,0.001,0.001,0.000666667,0.000666667,0.000666667,0.000666667,= 0.000666667,0.000666667} histogram_bounds = {757532,819803,874935,938170,1014421,1081507,1164659,1237281,1288267,1331= 016,1368939} Correlation -0.0736492 8.0.3: null_frac 0 avg_width 4 n_distinct 29287 most_common_vals = {765411,931762,983933,1180453,1181959,1229963,1280249,1288736,1314970,764= 901} most_common_freqs = {0.001,0.001,0.001,0.001,0.001,0.001,0.001,0.001,0.001,0.000666667} histogram_bounds = {757339,822949,875834,939085,1004782,1065251,1140682,1218336,1270024,1312= 170,1353082} Correlation -0.237136 Kind regards Markus