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

Home -> Community -> Mailing Lists -> Oracle-L -> Index suppression

Index suppression

From: <genegurevich_at_discoverfinancial.com>
Date: Thu, 3 Aug 2006 15:40:15 -0500
Message-ID: <OFE6C357FE.50D619D3-ON862571BF.0070AE4E-862571BF.00716C89@discoverfinancial.com>


Hello everybody:

I stumbled upon a SQL which executes in 20 to 30 sec the way it has been written. If I however suppress one index by replacing "table1.col1 = table2.col1" with "table1.col1+0 = table2.col1", the query executes in under 0.1sec. The explain plan shows that in the original version oracle accesses table1 via a primary key and then reads
data from the table. In the modified version oracle does a full table scan. As the table1 only has 10000 rows,
full table scan is probably faster than an index read followed by the table read.

So I wonder why does oracle optimizer (my version is 9204) insists on using the index and how can I force
it to be smarter. My optimizer_index_costr_adj is 100, which makes index as expensive as possible (I think).
I can't change the multiblock_read_count. Is there anything else I am missing?

thank you

Gene Gurevich

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Aug 03 2006 - 15:40:15 CDT

Original text of this message

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