Simple query but taking more time for execution. can somesome look this
iHi,
I am running the concurrent requests its taking more time to complete it due to the below query. Below query is taking more time(arround 4 hrs) for execution.
I have used the hints to reduce the execution time but it didnt helped. Can someone help me to tune this query.
SELECT
DECODE(INSTR(trx_number,'-'),0,NULL ,SUBSTR(trx_number,INSTR(trx_number,'-')+1)) trx
FROM ar_payment_schedules_all a ,
HZ_CUST_SITE_USES_ALL b
WHERE a.customer_site_use_id = b.site_use_id
AND b.location = p_location
AND a.trx_number LIKE P_trx_number || '%'
AND a.status = 'OP'
GROUP BY DECODE(INSTR(trx_number,'-'),0,NULL ,SUBSTR(trx_number,INSTR(trx_number,'-')+1));
Thanks,
Prabakaran