X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id C1F81D1C952 for ; Sun, 16 Nov 2003 13:53:17 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 51875-02 for ; Sun, 16 Nov 2003 09:52:50 -0400 (AST) Received: from scaup.mail.pas.earthlink.net (scaup.mail.pas.earthlink.net [207.217.120.49]) by svr1.postgresql.org (Postfix) with ESMTP id BCD36D1B536 for ; Sun, 16 Nov 2003 09:52:46 -0400 (AST) Received: from 0-1pool116-139.nas15.indianapolis1.in.us.da.qwest.net ([65.128.116.139] helo=nick) by scaup.mail.pas.earthlink.net with smtp (Exim 3.33 #1) id 1ALNKV-0000R4-00; Sun, 16 Nov 2003 05:52:44 -0800 Reply-To: From: "Nick Fankhauser" To: "Tom Lane" Cc: "Pgsql-Performance@Postgresql. Org" , "Ray Ontko" Subject: Re: n_distinct way off, but following a pattern. Date: Sun, 16 Nov 2003 08:52:29 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <5809.1068847947@sss.pgh.pa.us> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/132 X-Sequence-Number: 4692 > It would be interesting to see exactly what inputs are going into this > equation. Do you feel like adding some debug printouts into this code? > Or just looking at the variables with a debugger? In 7.3 it's about > line 1060 in src/backend/commands/analyze.c. Tom- I don't really have time to follow up at this moment, but I think this would be interesting to look into, so I'll plan to dig into it over the Thanksgiving Holiday when I'll have a little time free to follow up on some fun projects. Your pointers should let me get into it pretty quickly. In the meantime, I'll just set up a cron job that runs behind my nightly analyze to put the correct numbers into pg_statistic on the tables that this affects. Thanks- -Nick