Table has around five lac records
Gaurang Pathak, August 18, 2017 - 4:53 pm UTC
This table is used in one of our procedure in 10 individual queries joined by UNION and has around five lac records. We are tuning this procedure|queries. Our team members along with Application Head have decided to remove FULL TABLE ACCESS.
So provide solution to remove FULL TABLE ACCESS.
August 19, 2017 - 1:54 am UTC
Sigh.... that's not the way to tune SQL. But anyway, here you go:
select /*+ index(h) index(hh) */ hh.cash_receipt_id,
hh.gl_date,
hh.amount,
hh.status,
hh.account_code_combination_id,
hh.cash_receipt_history_id
from cflow_temp_1 h, ar_cash_receipt_history_all hh
where hh.cash_receipt_id = h.cash_receipt_id
and hh.cash_receipt_history_id = h.cash_receipt_history_id
Dont say I didnt warn you....
hum
A reader, August 19, 2017 - 6:26 am UTC
Yes Sigh.. is light.
Yes need lot of patience.
Well I begin by leading the *smallest * table eg cflow_temp_1 h.
select h.cash_receipt_id, ....
Eg begin by selecting h cols and try using of course the index hint but try also the leading (h hh) and why not a parallel hint. .
It's a matter of tuning.