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

Home -> Community -> Usenet -> c.d.o.server -> Why the optimizer sux..or sux I ?

Why the optimizer sux..or sux I ?

From: <ajung_at_suxers.de>
Date: 2000/07/18
Message-ID: <597d.3974ac92.ba6af@yetix.sz-sb.de>#1/1

Help me to believe in the Oracle 8i CBO: Assume the following table:

table ojs_main(docnum number primary key ,heading char(4));

The "heading" column is also index.
When I do a simple search like:

select docnum from ojs_main where heading='CONS' or heading='PARL'

I get an optimal execution plan by using a range scan on the index of the "heading" column. When I change the query to

select docnum from ojs_main where heading='CONS' or heading='PARX'

the optimizer suddenly uses a full table scan for the table ojs_main with much more consistent gets and physical reads. The complete table and all indexes are full analyzed.

So can someone explain me this behaviour ?

Andreas Received on Tue Jul 18 2000 - 00:00:00 CDT

Original text of this message

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