Re: Big disappointment with Postgres

From: Thomas Kellerer <>
Date: Fri, 04 Feb 2011 21:08:11 +0100
Message-ID: <>

Mladen Gogala wrote on 04.02.2011 20:12:
> First of all, this is demonstrably false idea. Optimizer, no matter how
> smart it might be, cannot help you with the correlated data. When you
> have the data with an intricate correlation, like the date of birth and
> Zodiac sign, to borrow Jonathan Lewis example, optimizer cannot know the
> right way of doing things. Oracle allows creating extended statistics,
> but even those will sometimes fail miserably with things like semijoin.
> In the situation when there is correlated data, the optimizer can be
> counted on to do exactly the wrong thing, no matter what the database is.
> In that case, the only solution is a human directive to the optimizer.
> That is what hints are.

Although I doubt you will accept the opinion of anyone else but yourself

Tom Kyte strongly detests hints as well:

From: Q: When should hints be used:
A: Never. They are the path of last resort.

From: "But -- I also have a rule -- don't use HINTS." ...
"If you find you are hinting every other query in your system -- something is obviously wrong and we need to fix it. Abusing hints is not recommended, you are just building another RBO if you do that -- precluding the software from doing its job. Might as well not have an optimizer at that point."

I will leave this futile discussion now Received on Fri Feb 04 2011 - 14:08:11 CST

Original text of this message