Wednesday, 11 September 2013

Join Performance Issue in Oracle

Join Performance Issue in Oracle

We have are having 2 tables.
Table - XYZ - > Having over 189 M Records
Table - ABC - > Having only 1098 records.
Our join query is some what like
select a.a, a.b, a.c
from xyz a , ABC r
where a.d = r.d
and a.sub not like '0%'
and ((a.eff_dat < sysdate) or (a.eff_date is null))
This is how our query is performing. In any way can it be optmised to
perform faster. Apart from the not like, can you suggest me any other
method.
In the explain plan I have seen that it is taking the 189 M as itrator and
checking with the 1098 records which is taking more time. I swapped the
tables after the from Key word but also it did not work. Tried leading
hint, which also not servered the purpose. Also a.d column is an indexed
one which is also used in the hint.
Please do suggest any methods for optimisation.

No comments:

Post a Comment