to optimize a self join request
Hi,
Please help me to optimise this request (tuninng with hints or another way..):
Select COUNT(DISTINCT T1.CIC_COU_CODE) P_CIC_COUNT_NUMB_D,T1.CIC_ACCO_NUMB,TO_CHAR(T1.CIC_DATE,'DD/MM/RRRR') P_CIC_DATE
FROM CARD_INDICATOR_COUNTRY T1, CARD_INDICATOR_COUNTRY T2
WHERE TO_CHAR(T2.CIC_LAST_DATE,'DD/MM/RRRR')=TO_CHAR(sysdate,'DD/MM/RRRR')
And T2.CIC_BAN_CODE=1
AND T1.CIC_ACCO_NUMB= T2.CIC_ACCO_NUMB
AND TO_CHAR(T1.CIC_DATE,'DD/MM/RRRR')=TO_CHAR(T2.CIC_DATE,'DD/MM/RRRR')
AND T1.CIC_FLAG_AUTH_TRAN='A'
GROUP BY T1.CIC_ACCO_NUMB,TO_CHAR(T1.CIC_DATE,'DD/MM/RRRR')
HAVING COUNT(DISTINCT T1.CIC_COU_CODE)>=2;
Many thanks and Regards
Subject
Views
Written By
Posted
to optimize a self join request
2196
June 14, 2012 08:23AM
1475
June 15, 2012 08:19AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.