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 -> Index and query help needed

Index and query help needed

From: <jamora_at_my-deja.com>
Date: Tue, 04 Apr 2000 18:20:46 GMT
Message-ID: <8cdbpb$etk$1@nnrp1.deja.com>


Hi
Can someone help me with a Query we have that is taking too long? If someone can tell me how to improve the response time on this query I will greatly appreciate it. Mainly I want suggestion on the indexes needed for the query to work
Our programmer has added indexes but cannot avoid a full table scan for this query and I think this is why it is taking too long, I am appending also the explain plan for the query The query goes like this:
SELECT U.LOCATION, T.TAX_CLASS, T.TAX_CUR FROM PS_PAY_TAX T, PS_PAY_CHECK U
WHERE t.PAY_END_DT between to_date('20-DEC-1999','DD-MON-YYYY') and to_date('26-DEC-1999','DD-MON-YYYY')

and T.COMPANY = U.COMPANY
and T.PAYGROUP = U.PAYGROUP
and T.PAY_END_DT = U.PAY_END_DT
and T.OFF_CYCLE = U.OFF_CYCLE
and T.PAGE# = U.PAGE#
and T.LINE# = U.LINE#
and T.sepchk = U.sepchk

The explain plan is:
SELECT STATEMENT Cost Cardinality
NESTED LOOPS Cost Cardinality
TABLE ACCESS FULL PS_PAY_TAX Cost Cardinality
TABLE ACCESS BY ROWID PS_PAY_CHECK Cost Cardinality
INDEX UNIQUE SCAN PS_PAY_CHECK Cost Cardinality
Any suggestions on what indexes to set? Thanks

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Apr 04 2000 - 13:20:46 CDT

Original text of this message

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