This is not true. It is always best to come up with a test case that presents your data and sees for yourself. If you want to truly understand the Oracle SQL Optimizer google Jonathan Lewis, read his books, read his blog, look at his website, the guy is awesome, and he always creates test cases.
create table mytab nologging as ( select mod(rownum, 3) x, rownum y, mod(rownum, 3) z from all_objects, (select 'x' from user_tables where rownum < 4) ); create index i on mytab (x, y, z); exec dbms_stats.gather_table_stats(ownname=>'DBADMIN',tabname=>'MYTAB', cascade=>true); set autot trace exp select * from mytab where y=5000; Execution Plan ---------------------------------------------------------- 0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1 Card=1 Bytes=10) 1 0 INDEX (SKIP SCAN) OF 'I' (INDEX) (Cost=1 Card=1 Bytes=10)
Ethan Post Sep 12 '08 at 15:47 2008-09-12 15:47
source share