Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

index on query

543662Mar 22 2007 — edited Mar 23 2007
Hi all, I have this query:
SELECT ped_num , art1
FROM orders
WHERE hp.order_id = :b2  
    AND at_cat = 'NONE'
    AND status = 'H'
    AND at12 IS NOT NULL
    AND to_date (at12, 'DD-MON-RRRR') <= trunc(to_date(:b1,'ddMONyyyy hh24miss')) ;


SELECT STATEMENT CHOOSE

TABLE ACCESS BY INDEX ROWID ZZ.ORDERS [Analyzed]
   NON-UNIQUE INDEX RANGE SCAN ZZ.ORDERS_N1 [Analyzed]
( 79 distinct values on order_id column )
( 2 distinct values on at_cat column )
( 2 distinct values on status column )
( 1 distinct values on at12 column )

( 93455 records on orders table )

The ORDERS_N1 is non-unique and is on ORDER_ID column.


I don't know if the best is to create an compositive index with all the columns of the query.

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 20 2007
Added on Mar 22 2007
8 comments
500 views