Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 0FF819FBDB9 for ; Fri, 30 Mar 2007 07:09:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 76961-08 for ; Fri, 30 Mar 2007 07:09:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from pns.mm.eutelsat.org (pns.mm.eutelsat.org [194.214.173.227]) by postgresql.org (Postfix) with ESMTP id 160509FB79C for ; Fri, 30 Mar 2007 07:09:21 -0300 (ADT) Received: from mail.mm.eutelsat.org (localhost [127.0.0.1]) by pns.mm.eutelsat.org (8.11.6/linuxconf) with ESMTP id l2UA87N06558; Fri, 30 Mar 2007 12:08:07 +0200 Received: from [127.0.0.1] (accesspoint.mm.eutelsat.org [194.214.173.4]) by mail.mm.eutelsat.org (8.13.1/8.13.1) with ESMTP id l2UABsSU012391; Fri, 30 Mar 2007 12:11:54 +0200 Message-ID: <460CE19A.3060909@bigfoot.com> Date: Fri, 30 Mar 2007 12:08:26 +0200 From: Gaetano Mendola User-Agent: Thunderbird 2.0.0.0pre (Windows/20070328) MIME-Version: 1.0 To: "pgsql-performance@postgresql.org" CC: Claus Guttesen Subject: Re: Wrong plan sequential scan instead of an index one References: <460CD941.6080303@bigfoot.com> In-Reply-To: X-Enigmail-Version: 0.95b Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.88.7, clamav-milter version 0.88.7 on mail.mm.eutelsat.org X-Virus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/439 X-Sequence-Number: 23844 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Claus Guttesen wrote: >> 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? I have tuned that number already at 2.5, lowering it to 2 doesn't change the plan. Regards Gaetano Mendola -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGDOGa7UpzwH2SGd4RAjvaAKDAbz/vxwyOBPCILGpw8rBSvTFMtACfRPBe yMge0RFfww0ef7xrGBLal7o= =k+RM -----END PGP SIGNATURE-----