Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 6A9B69FBD92 for ; Fri, 30 Mar 2007 06:51:07 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 46682-09 for ; Fri, 30 Mar 2007 06:51:04 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.230]) by postgresql.org (Postfix) with ESMTP id 5E1929FB51D for ; Fri, 30 Mar 2007 06:51:04 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id 70so550571wra for ; Fri, 30 Mar 2007 02:51:03 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=AlMg0Y29rm35QXFze9WQOdxy3SiVEWfrfEfg4v5AWQWYGd45YsWWdoIvvshtG1IgxtwqQWNVXBo0nZ1azEvzc+HH6hU7yqWL/AaS8NkDy2p1+xJf9BfSu3Z/MaNRVAXRc+Spt21IsKiOK2GmwGvhiP6+01eBDzrnYpQggAPkVKE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=CIXPUwxcG84VmChNAkTtE+hWUbqlJGe8u09iJFvKnPaBv8U66HqccEmMfQMOWdCs4+t/bLfB/VuWqAJm0HMP/wJOeDu70x/LbdLvGHw5IRRZ2/B5BEAQl2rp7F/c+Idp2ORncTJfBmA/w4JY9zY7xEYHRBplkoN5JfGY3y22dYY= Received: by 10.114.197.1 with SMTP id u1mr664996waf.1175248263168; Fri, 30 Mar 2007 02:51:03 -0700 (PDT) Received: by 10.114.194.12 with HTTP; Fri, 30 Mar 2007 02:51:03 -0700 (PDT) Message-ID: Date: Fri, 30 Mar 2007 11:51:03 +0200 From: "Claus Guttesen" To: "Gaetano Mendola" Subject: Re: Wrong plan sequential scan instead of an index one Cc: "pgsql-performance@postgresql.org" In-Reply-To: <460CD941.6080303@bigfoot.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <460CD941.6080303@bigfoot.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/437 X-Sequence-Number: 23842 > Hi all, > take a look at those plans: Try changing random_page_cost from the default 4 to 2 in postgresql.conf: random_page_cost = 2 The default in postgresql is somewhat conservative. This setting indicates for postgresql how fast your disks are, the lower the faster. Could this setting be changed to 2 as default rather than 4? regards Claus