Re: Big disappointment with Postgres

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Sat, 5 Feb 2011 14:21:40 -0000
Message-ID: <qpudnSPoRugqwdDQnZ2dnUVZ8mydnZ2d_at_bt.com>


"Thomas Kellerer" <OTPXDAJCSJVU_at_spammotel.com> wrote in message news:8r34l6Fn40U1_at_mid.individual.net...
>
> Tom Kyte strongly detests hints as well:
>
> From:
> http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:7038986332061
> Q: When should hints be used:
> A: Never. They are the path of last resort.
>

"Never" and "last resort" aren't mutually compatible. I think we can infer from this that "never" is an exaggeration for emphsis

>
> From:
> http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:8912905298920
> "But -- I also have a rule -- don't use HINTS."
> ...

But the next sentence lists some hints that Tom thinks are okay - so there's another citation that isn't the black and white decision that you imply..

> "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."
>

"every other query", "abusing hints" - I think we get the idea from this that Tom's complain matches the fears of the Postgres developers, that if you supply a feature some people will abuse it (as in "abusing hints"), rather than using it with the caution it merits.

>
> I will leave this futile discussion now
>

Before you go, could you tell us what you would have to do as a DBA to ensure that Postgres could calculate the correct selectivity on something as simple as:

select *
from orders
where

    date_delivered > date_placed + 72 hours ;

-- 
Regards

Jonathan Lewis
http://jonathanlewis.wordpress.com
Received on Sat Feb 05 2011 - 08:21:40 CST

Original text of this message