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 -> SQL Query

SQL Query

From: Oradba Linux <oradba_linux_at_verizon.net>
Date: Thu, 18 Jan 2007 03:09:50 GMT
Message-ID: <2yBrh.30340$Gj5.16755@trnddc01>

Select * from orders where load_id = 174659 order by order_id ;

select * from orders where load_id = 174659 order by order_dt;

I have similar queries. This table has about 19mil rows. Statistics are current. Order_id is the primary key. The index exists on load_id. The first one does a index full scan on order_id and second one does a index range scan on load_id. There is no index on order_dt. If needed i can post the explain plans and stats details from user_tables/user_indexes. I am wondering why the index on load_id is not chosen in the first SQL statement. Received on Wed Jan 17 2007 - 21:09:50 CST

Original text of this message

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