Re: [HACKERS] Slow count(*) again... - Mailing list pgsql-performance

From Craig James
Subject Re: [HACKERS] Slow count(*) again...
Date
Msg-id 4D4B436A.5030002@emolecules.com
Whole thread Raw
In response to Re: [HACKERS] Slow count(*) again...  (Shaun Thomas <sthomas@peak6.com>)
List 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 by date:

Previous
From: Mladen Gogala
Date:
Subject: Re: [HACKERS] Slow count(*) again...
Next
From: Shaun Thomas
Date:
Subject: Re: [HACKERS] Slow count(*) again...