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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Need help identifying an index to speed up query

Re: Need help identifying an index to speed up query

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 17 Mar 2006 09:24:54 -0800
Message-ID: <1142616294.193891.168210@j33g2000cwa.googlegroups.com>


There is no reason to create an index on SUBID because you are interested in rows with this value being NULL. Nulls are not stored in single column indexes so an index on SUBID would only make sense for equility conditions on a vaue, that is, not null condition.

You should have one composite index on each table that includes all three join columns listed so that id1 and id2 are the leading columns in the index since these values are specified in the where clause. Then you should have an index on B.DETAILID.

Refresh the object statistics after adding the indexes.

If the CBO drives on the new index and query performance is still too slow you could try rebuilding the index to include the MASTERID1 and MASTERID2 columns as well as DETAILD. You would now have all three composit index values in your where clause: B.MASTERID = 'AA' instead of A.MASTERID = 'AA'.

HTH -- Mark D Powell -- Received on Fri Mar 17 2006 - 11:24:54 CST

Original text of this message

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