Skip site navigation (1) Skip section navigation (2)

Re: Query much faster with enable_seqscan=0

From: Ogden <lists(at)darkstatic(dot)com>
To: Jesper Krogh <jesper(at)krogh(dot)cc>
Cc: Kenneth Marshall <ktm(at)rice(dot)edu>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Query much faster with enable_seqscan=0
Date: 2010-09-21 19:02:11
Message-ID: 3062DF4E-7460-4487-818A-BF77F176E501@darkstatic.com (view raw or flat)
Thread:
Lists: pgsql-performance
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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance


In response to

Responses

pgsql-performance by date

Next:From: Joshua D. DrakeDate: 2010-09-21 19:07:11
Subject: Re: Query much faster with enable_seqscan=0
Previous:From: Jesper KroghDate: 2010-09-21 18:51:14
Subject: Re: Query much faster with enable_seqscan=0

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group