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 1BE87D1B1D5 for ; Wed, 9 Jun 2004 23:17:59 -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 49216-10 for ; Thu, 10 Jun 2004 02:17:58 +0000 (GMT) Received: from tht.net (vista.tht.net [216.126.88.2]) by svr1.postgresql.org (Postfix) with ESMTP id 5C09CD1B1B3 for ; Wed, 9 Jun 2004 23:17:53 -0300 (ADT) Received: from [134.22.68.4] (dyn-68-4.tor.dsl.tht.net [134.22.68.4]) by tht.net (Postfix) with ESMTP id CA88D76A7F; Wed, 9 Jun 2004 22:18:03 -0400 (EDT) Subject: Re: Index oddity From: Rod Taylor To: Christopher Kings-Lynne Cc: ken , Postgresql Performance In-Reply-To: <40C7BD2A.70604@familyhealth.com.au> 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> Content-Type: text/plain Message-Id: <1086833876.2539.156.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 09 Jun 2004 22:17:57 -0400 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/108 X-Sequence-Number: 7166 On Wed, 2004-06-09 at 21:45, Christopher Kings-Lynne wrote: > > If I take away the diagonalSize condition in my query I find that there > > are 225 rows that satisfy the other conditions. 155 of these have a > Maybe you should drop your random_page_cost to something less than 4, > eg. 3 or even 2... 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.