Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Need help identifying an index to speed up query
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.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