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 447A79DCC12 for ; Tue, 10 Jan 2006 11:32:23 -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 23901-06-11 for ; Tue, 10 Jan 2006 11:32:24 -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 ADDF99DD073 for ; Tue, 10 Jan 2006 11:23:03 -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 k0AFMxvM029703; Tue, 10 Jan 2006 10:22:59 -0500 (EST) To: Alessandro Baretta cc: Matteo Beccati , pgsql-performance@postgresql.org Subject: Re: 500x speed-down: Wrong statistics! In-reply-to: <43C3665F.5020106@barettadeit.com> References: <43C26A5F.7040702@barettadeit.com> <43C27AFA.7060604@beccati.com> <43C28DEA.60801@barettadeit.com> <6719.1136832065@sss.pgh.pa.us> <43C2B06B.4050506@barettadeit.com> <6914.1136833010@sss.pgh.pa.us> <43C3665F.5020106@barettadeit.com> Comments: In-reply-to Alessandro Baretta message dated "Tue, 10 Jan 2006 08:46:39 +0100" Date: Tue, 10 Jan 2006 10:22:59 -0500 Message-ID: <29702.1136906579@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.077 required=5 tests=[AWL=0.077] X-Spam-Score: 0.077 X-Spam-Level: X-Archive-Number: 200601/87 X-Sequence-Number: 16565 Alessandro Baretta writes: > I have no clue as to how or why the statistics were wrong > yesterday--as I vacuum-analyzed continuously out of lack of any better > idea--and I was stupid enough to re-timestamp everything before > selecting from pg_stats. Too bad. I would be interested to find out how, if the stats were up-to-date, the thing was still getting the row estimate so wrong. If you manage to get the database back into its prior state please do send along the pg_stats info. regards, tom lane