From: Ogden <lists@darkstatic.com>
To: Jesper Krogh <jesper@krogh.cc>
Cc: Kenneth Marshall <ktm@rice.edu>
Cc: pgsql-performance@postgresql.org
Subject: Re: Query much faster with enable_seqscan=0
Date: Tue, 21 Sep 2010 14:02:11 -0500
Message-ID: <3062DF4E-7460-4487-818A-BF77F176E501@darkstatic.com> (raw)
In-Reply-To: <4C98FEA2.8030607@krogh.cc>
References: <0D5B9ED0-00C3-4EEB-8336-0B2F8A884620@darkstatic.com>
<20100921180618.GI17152@aart.is.rice.edu>
<D707045F-C689-403A-9729-8DBCC39F53A1@darkstatic.com>
<4C98FEA2.8030607@krogh.cc>
How odd, I set the following:
seq_page_cost = 1.0
random_page_cost = 2.0
And now the query runs in milliseconds as opposed to 14 seconds. Could this really be the change? I am running ANALYZE now - how often is it recommended to do this?
Thank you
Ogden
On Sep 21, 2010, at 1:51 PM, Jesper Krogh wrote:
> 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
>
> --
> Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: lists@darkstatic.com, jesper@krogh.cc, ktm@rice.edu
Subject: Re: Query much faster with enable_seqscan=0
In-Reply-To: <3062DF4E-7460-4487-818A-BF77F176E501@darkstatic.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox