Re: Changing tuning parameters with EXPLAIN

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Changing tuning parameters with EXPLAIN
Дата
Msg-id 1338843668.27297.2.camel@sussancws0025
обсуждение исходный текст
Ответ на Changing tuning parameters with EXPLAIN  (Antonio Carlos Salzvedel Furtado Junior <acsfj08@inf.ufpr.br>)
Ответы Re: Changing tuning parameters with EXPLAIN  (Antonio Carlos Salzvedel Furtado Junior <acsfj08@inf.ufpr.br>)
Список pgsql-novice
On Mon, 2012-06-04 at 17:49 -0300, Antonio Carlos Salzvedel Furtado
Junior wrote:
> Hello PostgreSQL users,
>
> I've been working with the estimated cost from EXPLAIN. I was
> wondering if  I could change the tuning parameters, to produce new
> estimated costs, without interfering with the database workload. Is it
> possible?
>
> I'm changing these parameters by executing SQL queries ("SET"). The
> problem is that once I change these parameters, the query optimizer
> will start using these values to build their query plans.

If you issue a SET, it only affects queries executed in your connection
(the session). So this is safe for EXPLAINing queries. If you do a "SET
LOCAL" within a transaction, it will only affect that transaction.

To make the values persist and get picked up by other connections, you
need to set them in postgresql.conf and send a SIGHUP (or restart, of
course).

Regards,
    Jeff Davis


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

Предыдущее
От: Antonio Carlos Salzvedel Furtado Junior
Дата:
Сообщение: Changing tuning parameters with EXPLAIN
Следующее
От: Antonio Carlos Salzvedel Furtado Junior
Дата:
Сообщение: Re: Changing tuning parameters with EXPLAIN