following query is taking more CPU and Run time(more than 12hours for 65,0000 input records),do u have any sugeestions how to fine tune this DB2 query.
DECLARE EMP1 CURSOR WITH HOLD FOR
FROM EMP1 A,
WHERE A.STRT_LN_LOC_C = :POE
A.END_LN_LOC_C = :POI
A.EMP1_LN_ID = B.EMP1_LN_ID
B.EMP2_LN_ID = C.EMP2_LN_ID
C.DEPTR_D > :WS-CURR-DATE
A.SCAC_C = :CODE
FOR FETCH ONLY
pls let me know ur suggestins for fine tuning this query.
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
what are the predicates you are using in the where clause 'OR' / 'AND' ?
provide more detials like the keys, indexes etc .. and if u r using the cursor for only fetch y the with hold ? wht are you using this cursor for ?