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 20E383A5E4C for ; Thu, 13 Jan 2005 00:50:20 +0000 (GMT) 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 04333-08 for ; Thu, 13 Jan 2005 00:50:07 +0000 (GMT) Received: from quasar.skima.is (quasar.skima.is [212.30.200.205]) by svr1.postgresql.org (Postfix) with ESMTP id 602383A4FDA for ; Thu, 13 Jan 2005 00:50:08 +0000 (GMT) Received: from gnari ([157.157.193.37] [157.157.193.37]) by quasar.skima.is with ESMTP; Thu, 13 Jan 2005 00:50:07 Z Subject: Re: Postgres Optimizer is not smart enough? From: Ragnar =?ISO-8859-1?Q?Hafsta=F0?= To: Mark Kirkwood Cc: pgsql-performance@postgresql.org In-Reply-To: <41E5AF3F.2080100@coretech.co.nz> References: <20050112222506.32084.qmail@web13124.mail.yahoo.com> <41E5AF3F.2080100@coretech.co.nz> Content-Type: text/plain Date: Thu, 13 Jan 2005 00:50:16 +0000 Message-Id: <1105577416.5220.50.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200501/157 X-Sequence-Number: 9847 On Thu, 2005-01-13 at 12:14 +1300, Mark Kirkwood wrote: [snip some explains] > > I have random_page_cost = 0.8 in my postgresql.conf. Setting it back to > the default (4) results in a plan using test_id1. it is not rational to have random_page_cost < 1. if you see improvement with such a setting, it is as likely that something else is wrong, such as higher statistic targets needed, or a much too low effective_cache setting. gnari