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 -> Need help identifying an index to speed up query

Need help identifying an index to speed up query

From: <johnnynine_at_hotmail.com>
Date: 16 Mar 2006 15:57:21 -0800
Message-ID: <1142553441.671704.219070@p10g2000cwp.googlegroups.com>


I'm sure this is fairly simple but I need help speeding up a query which is taking far too long to run. I'm joining 2 tables and retrieving a single value. I would think a proper index(es) would solve the performance issue.

Can anyone please let me know what index(es) would speed this query up?

SELECT B.AMOUNT FROM MASTER A, DETAIL B

WHERE  A.MASTERID1 = B.MASTERID1
   AND A.MASTERID2 = B.MASTERID2
   AND A.MASTERID3 = B.MASTERID3

   AND (A.SUBID = '' OR A.SUBID IS NULL)
   AND A.MASTERID1 ='AA'
   AND A.MASTERID2 ='AB'
   AND B.DETAILID = 'ABC'

The check for subid being '' or null is there for sql server compatibility, however I am just interested in oracle in this case.

Any help would be very appreciated.

Thanks,
Johnny Received on Thu Mar 16 2006 - 17:57:21 CST

Original text of this message

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