Re: Slow query with planner row strange estimation

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Slow query with planner row strange estimation
Дата
Msg-id AANLkTinZTtR7aAM+98z+TpWT+bO63A0DCTZNETSPsR1J@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Slow query with planner row strange estimation  (phb07 <phb07@apra.asso.fr>)
Список pgsql-performance
On Mon, Jul 12, 2010 at 4:33 PM, phb07 <phb07@apra.asso.fr> wrote:
>
> Dimitri a écrit :
>>
>> It's probably one of the cases when having HINTS in PostgreSQL may be
>> very helpful..
>>
>> SELECT /*+ enable_nestloop=off */ ... FROM ...
>>
>> will just fix this query without impacting other queries and without
>> adding any additional instructions into the application code..
>>
>> So, why there is a such resistance to implement hints withing SQL
>> queries in PG?..
>>
>
> +1.
> Another typical case when it would be helpful is with setting the
> cursor_tuple_fraction GUC variable for a specific statement, without being
> obliged to issue 2 SET statements, one before the SELECT and the other
> after.

We've previously discussed adding a command something like:

LET (variable = value, variable = value, ...) command

...which would set those variables just for that one command.  But
honestly I'm not sure how much it'll help with query planner problems.
 Disabling nestloops altogether, even for one particular query, is
often going to be a sledgehammer where you need a scalpel.   But then
again, a sledgehammer is better than no hammer.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

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

Предыдущее
От: Craig James
Дата:
Сообщение: Re: Using more tha one index per table
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Pooling in Core WAS: Need help in performance tuning.