Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Why the monstrous SORT?

Re: Why the monstrous SORT?

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Tue, 12 Jul 2005 09:37:29 +0100
Message-ID: <008401c586bc$f09b4b50$7b02a8c0@Primary>

AND NOT upper(a.item_no) LIKE 'AF-%'

      AND NOT upper(a.item_no) LIKE 'IFF%'

I wasn't aware until now that when applying functions in the predicate like this the CBO (apparently) uses a default

selectivity of only 1%.
                        ^^^^^^


This depends on the nature of the predicate. In the case of

    AND NOT upper(a.item_no) LIKE 'AF-%' I think you'll find it's 5%

As far as I know it's only

    function(colx) = const
that gets 1%

Regards

Jonathan Lewis

Now waiting on the publishers: Cost Based Oracle - Volume 1

http://www.jlcomp.demon.co.uk/faq/ind_faq.html The Co-operative Oracle Users' FAQ

http://www.jlcomp.demon.co.uk/appearances.html Public Appearances - schedule updated 8th July 2005

--

http://www.freelists.org/webpage/oracle-l Received on Tue Jul 12 2005 - 03:39:21 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US