Re: Pointers needed on optimizing slow SQL statements

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Pointers needed on optimizing slow SQL statements
Дата
Msg-id 4A2823EB.1020406@agliodbs.com
обсуждение исходный текст
Ответ на Re: Pointers needed on optimizing slow SQL statements  (Janine Sisk <janine@furfly.net>)
Список pgsql-performance
On 6/3/09 7:32 PM, Janine Sisk 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.

It's possible that it won't change the plan; 100 is often not enough to
change the statistics.

Try changing, in a superuser session, default_statistics_target to 400
and just ANALYZing the one table, and see if that changes the plan.  If
so, you'll want to increase the statistics setting on the filtered
columns on that table.


--
Josh Berkus
PostgreSQL Experts Inc.
www.pgexperts.com

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Scalability in postgres
Следующее
От: James Mansion
Дата:
Сообщение: Re: Scalability in postgres