Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 1F7361337B4F for ; Tue, 21 Sep 2010 15:51:30 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 38424-04-7 for ; Tue, 21 Sep 2010 18:51:23 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from shrek.krogh.cc (2605ds1-ynoe.0.fullrate.dk [90.184.12.24]) by mail.postgresql.org (Postfix) with ESMTP id 26BAB1337B63 for ; Tue, 21 Sep 2010 15:51:19 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by shrek.krogh.cc (Postfix) with ESMTP id 4A7D5C44002; Tue, 21 Sep 2010 20:51:18 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at shrek.krogh.cc Received: from shrek.krogh.cc ([127.0.0.1]) by localhost (shrek.krogh.cc [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eg-E6y-P9GZ4; Tue, 21 Sep 2010 20:51:14 +0200 (CEST) Received: from [90.184.13.151] (2605ds1-ynoe.2.fullrate.dk [90.184.13.151]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jesper@krogh.cc) by shrek.krogh.cc (Postfix) with ESMTPSA id 6592DC44001; Tue, 21 Sep 2010 20:51:14 +0200 (CEST) Message-ID: <4C98FEA2.8030607@krogh.cc> Date: Tue, 21 Sep 2010 20:51:14 +0200 From: Jesper Krogh User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6 MIME-Version: 1.0 To: Ogden CC: Kenneth Marshall , pgsql-performance@postgresql.org Subject: Re: Query much faster with enable_seqscan=0 References: <0D5B9ED0-00C3-4EEB-8336-0B2F8A884620@darkstatic.com> <20100921180618.GI17152@aart.is.rice.edu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201009/127 X-Sequence-Number: 40330 On 2010-09-21 20:21, Ogden wrote: > I assume you mean random_page_cost? It is currently set to 4.0 - is it better to increase or decrease this value? > Should be lowered to a bit over seq_page_cost.. and more importantly.. you should make sure that you have updated your statistics .. run "ANALYZE"; -- Jesper