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 4AE84D1B18F for ; Thu, 10 Jun 2004 00:08:55 -0300 (ADT) 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 81657-02 for ; Thu, 10 Jun 2004 03:08:53 +0000 (GMT) Received: from mail.coretech.co.nz (coretech.co.nz [202.36.204.41]) by svr1.postgresql.org (Postfix) with ESMTP id DF531D1B243 for ; Thu, 10 Jun 2004 00:08:50 -0300 (ADT) Received: (qmail 436 invoked from network); 10 Jun 2004 03:08:49 -0000 Received: from unknown (HELO coretech.co.nz) (10.0.10.28) by 0 with SMTP; 10 Jun 2004 03:08:49 -0000 Message-ID: <40C7D0C1.5040504@coretech.co.nz> Date: Thu, 10 Jun 2004 15:08:49 +1200 From: Mark Kirkwood User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Rod Taylor Cc: Christopher Kings-Lynne , ken , Postgresql Performance Subject: Re: Index oddity References: <1086809460.32077.246.camel@pesky> <1086811930.2539.90.camel@jester> <1086814209.32077.252.camel@pesky> <1086814597.2539.92.camel@jester> <1086814928.32077.259.camel@pesky> <1086816543.2539.98.camel@jester> <1086822662.32077.278.camel@pesky> <40C7BD2A.70604@familyhealth.com.au> <1086833876.2539.156.camel@jester> In-Reply-To: <1086833876.2539.156.camel@jester> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/109 X-Sequence-Number: 7167 Rod Taylor wrote: > >The big problem is a very poor estimate (off by a couple orders of >magnitude). I was hoping someone with more knowledge in fixing those >would jump in. > > > > ANALYZE might be producing poor stats due to : i) many dead tuples or ii) high proportion of dead tuples in the first few pages of the table Does a VACUUM FULL followed by ANALYZE change the estimates (or have you tried this already)? (p.s. - I probably don't qualify for the 'more knowledge' bit either...) regards Mark