Re: Enabling and disabling run time configuration parameters.

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Enabling and disabling run time configuration parameters.
Дата
Msg-id 200306050919.10717.josh@agliodbs.com
обсуждение исходный текст
Ответ на Enabling and disabling run time configuration parameters.  (Yusuf <yusuf0478@netscape.net>)
Список pgsql-performance
Yusuf,

> Is it a good idea, to temporarily adjust those values before running a
> query to spend up the execution time?  I've searched online and wasn't
> able to find articles about it.

No.  The "enable_%" vars are intended as settings for *testing*, to tell you
if you have a problem with your query structure or indexing, cost variables,
or are in need of a VACUUM.  Using them in a production capacity is a bad
idea, because you haven't addressed the problem that was causing the query to
be slow in the first place, and as your database changes over time your
queries will become slow again.

Adhjusting the *cost* variables is a good idea.   Find you need
ENABLE_SEQSCAN=FALSE a lot?   Raise your cache_size and lower your
random_tuple_cost variables, among other adjustments.

For further adjustments, post some of your "bad queries" to this list.  Be
sure to include *all* of the following:

1) VACUUM FULL ANALYZE before testing.
2) Include the full query.
3) Include the EXPLAIN ANALYZE results of the query.
4) Include (possibly as a text attachment) the schema of relevant tables,
including (especially!) indexes.

--
Josh Berkus
Aglio Database Solutions
San Francisco

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

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: Enabling and disabling run time configuration parameters.
Следующее
От: Rod Taylor
Дата:
Сообщение: Re: Enabling and disabling run time configuration parameters.