Re: Query much faster with enable_seqscan=0 - Mailing list pgsql-performance

From Joshua D. Drake
Subject Re: Query much faster with enable_seqscan=0
Date
Msg-id 1285096031.15919.68.camel@jd-desktop.unknown.charter.com
Whole thread Raw
In response to Re: Query much faster with enable_seqscan=0  (Ogden <lists@darkstatic.com>)
Responses Re: Query much faster with enable_seqscan=0
List pgsql-performance
On Tue, 2010-09-21 at 14:02 -0500, Ogden wrote:
> 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
ANALYZEnow - how often is it recommended to do this? 

PostgreSQL's defaults are based on extremely small and some would say
(non production) size databases. As a matter of course I always
recommend bringing seq_page_cost and random_page_cost more in line.

However, you may want to try moving random_page_cost back to 4 and try
increasing cpu_tuple_cost instead.

Sincerely,

Joshua D. Drake

--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579
Consulting, Training, Support, Custom Development, Engineering
http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt

pgsql-performance by date:

Previous
From: Ogden
Date:
Subject: Re: Query much faster with enable_seqscan=0
Next
From: Greg Smith
Date:
Subject: Re: Query much faster with enable_seqscan=0