Re: Query much faster with enable_seqscan=0

Поиск
Список
Период
Сортировка
От Joshua D. Drake
Тема Re: Query much faster with enable_seqscan=0
Дата
Msg-id 1285096031.15919.68.camel@jd-desktop.unknown.charter.com
обсуждение исходный текст
Ответ на Re: Query much faster with enable_seqscan=0  (Ogden <lists@darkstatic.com>)
Ответы Re: Query much faster with enable_seqscan=0
Список 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 по дате отправления:

Предыдущее
От: Ogden
Дата:
Сообщение: Re: Query much faster with enable_seqscan=0
Следующее
От: Greg Smith
Дата:
Сообщение: Re: Query much faster with enable_seqscan=0