From: | Mladen Gogala <mladen(dot)gogala(at)vmsinfo(dot)com> |
---|---|
To: | "sthomas(at)peak6(dot)com" <sthomas(at)peak6(dot)com> |
Cc: | "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Slow count(*) again... |
Date: | 2011-02-03 22:03:07 |
Message-ID: | 4D4B261B.6010303@vmsinfo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-performance |
Shaun Thomas wrote:
> You missed the argument. The community, or at least the devs, see hints
> as an ugly hack. Do I agree? Not completely, but I can definitely
> understand the perspective. Saying every other "vendor" has hints is
> really just admitting every other vendor has a crappy optimizer. Is that
> something to be proud of?
>
This is funny? Everybody else has a crappy optimizer? That's a funny way
of looking at the fact that every other major database supports hints. I
would be tempted to call that a major missing feature, but the statement
that everybody else has a crappy optimizer sounds kind of funny. No
disrespect meant. It's not unlike claiming that the Earth is 6000 years old.
>
> And here's something I never saw you consider: hints making performance
> worse.
>
Sure. If you give me the steering wheell, there is a chance that I might
get car off the cliff or even run someone over, but that doesn't mean
that there is no need for having one. After all, we're talking about the
ability to control the optimizer decision.
> Want to remove a reverse index scan? Reindex with DESC on the column
> being reversed. That was added in 8.3. Getting too many calls for nested
> loops when a merge or hash would be faster? Increase the statistics
> target for the column causing the problems and re-analyze. Find an
> actual bug in the optimizer? Tell the devs and they'll fix it. Just stay
> current, and you get all those benefits. This is true for any database;
> bugs get fixed, things get faster and more secure.
>
In the meantime, the other databases provide hints which help me bridge
the gap. As I said before: hints are there, even if they were not meant
to be used that way. I can do things in a way that I consider very
non-elegant. The hints are there because they are definitely needed.
Yet, there is a religious zeal and a fatwa against them.
--
Mladen Gogala
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251
http://www.vmsinfo.com
The Leader in Integrated Media Intelligence Solutions
From | Date | Subject | |
---|---|---|---|
Next Message | Ben Chobot | 2011-02-03 22:04:06 | Re: [HACKERS] Slow count(*) again... |
Previous Message | Mark Kirkwood | 2011-02-03 21:51:24 | Re: [HACKERS] Slow count(*) again... |
From | Date | Subject | |
---|---|---|---|
Next Message | Ben Chobot | 2011-02-03 22:04:06 | Re: [HACKERS] Slow count(*) again... |
Previous Message | Mark Kirkwood | 2011-02-03 21:51:24 | Re: [HACKERS] Slow count(*) again... |