Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 3D0A69FB5B7 for ; Wed, 1 Aug 2007 14:59:18 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 04050-09 for ; Wed, 1 Aug 2007 14:59:15 -0300 (ADT) X-Greylist: delayed 00:21:55.056006 by SQLgrey-1.7.5 Received: from mail.trixing.net (mail.trixing.net [87.230.125.58]) by postgresql.org (Postfix) with ESMTP id D580E9FB55A for ; Wed, 1 Aug 2007 14:59:14 -0300 (ADT) Received: from [192.168.1.195] (ident=jdittmer) by mail.trixing.net with esmtp (Exim 4.63) (envelope-from ) id 1IGI8V-0000xE-9O; Wed, 01 Aug 2007 19:37:29 +0200 Message-ID: <46B0C4C7.7000202@l4x.org> Date: Wed, 01 Aug 2007 19:37:11 +0200 From: Jan Dittmer User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070329 Thunderbird/1.5.0.10 Mnenhy/0.7.4.666 MIME-Version: 1.0 To: Scott Marlowe CC: Bruno Rodrigues Siqueira , pgsql-performance@postgresql.org References: <46ABA01E.8000802@emolecules.com> <002001c7d153$944f3c60$e900a8c0@brunolaptop> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 192.168.1.195 X-SA-Exim-Mail-From: jdi@l4x.org Subject: Re: select on 1milion register = 6s X-SA-Exim-Version: 4.2.1 (built Tue, 09 Jan 2007 17:51:29 +0000) X-SA-Exim-Scanned: Yes (on mail.trixing.net) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200708/7 X-Sequence-Number: 26137 Scott Marlowe wrote: >> random_page_cost = 1 # units are one sequential page >> fetch > > Seldom if ever is it a good idea to bonk the planner on the head with > random_page_cost=1. setting it to 1.2 ot 1.4 is low enough, but 1.4 > to 2.0 is more realistic. Which is probably the reason why the planner thinks a seq scan is faster than an index scan... Jan