Re: Pointers needed on optimizing slow SQL statements

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Pointers needed on optimizing slow SQL statements
Дата
Msg-id dcc563d10906032231k4f28bf80r87c27e16db0653d0@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Pointers needed on optimizing slow SQL statements  (Janine Sisk <janine@furfly.net>)
Список pgsql-performance
On Wed, Jun 3, 2009 at 8:32 PM, Janine Sisk <janine@furfly.net> wrote:
> I'm sorry if this is a stupid question, but...  I changed
> default_statistics_target from the default of 10 to 100, restarted PG, and
> then ran "vacuumdb -z" on the database.  The plan is exactly the same as
> before.  Was I supposed to do something else?  Do I need to increase it even
> further?  This is an overloaded system to start with, so I'm being fairly
> conservative with what I change.

No need to restart pg, just analyze is good enough (vacuumdb -z will do).

After that, compare your explain analyze output and see if the
estimates are any better.  If they're better but not good enough, try
increasing stats target to something like 500 or 1000 (max is 1000)
and reanalyze and see if that helps.  If not, post the new explain
analyze and we'll take another whack at it.

В списке pgsql-performance по дате отправления:

Предыдущее
От: Reid Thompson
Дата:
Сообщение: Re: degenerate performance on one server of 3
Следующее
От: Marc Cousin
Дата:
Сообщение: Re: Scalability in postgres