Re: [HACKERS] Slow count(*) again...

Поиск
Список
Период
Сортировка
От Craig James
Тема Re: [HACKERS] Slow count(*) again...
Дата
Msg-id 4D4B436A.5030002@emolecules.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Slow count(*) again...  (Shaun Thomas <sthomas@peak6.com>)
Список pgsql-performance
On 2/3/11 1:34 PM, Shaun Thomas wrote:
>> I must say that this purist attitude is extremely surprising to me.
>> All the major DB vendors support optimizer hints, yet in the
>> Postgres community, they are considered bad with almost religious
>> fervor. Postgres community is quite unique with the fatwa against
>> hints.
>
> You missed the argument. The community, or at least the devs, see hints
>  as an ugly hack.

Let's kill the myth right now that Postgres doesn't have hints.  It DOES have hints.

Just read this forum for a few days and see how many time there are suggestions like "disable nested loops" or "disable
seqscan",or "change the random page cost", or "change the join collapse limit". 

All of these options are nothing more than a way of altering the planner's choices so that it will pick the plan that
thedesigner already suspects is more optimal. 

If that's not a hint, I don't know what is.

Craig

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

Предыдущее
От: Mladen Gogala
Дата:
Сообщение: Re: [HACKERS] Slow count(*) again...
Следующее
От: Shaun Thomas
Дата:
Сообщение: Re: [HACKERS] Slow count(*) again...