Hi Gurus,
I Have the following query which i want to tune.
Select
a.add,
a.stamp_updt,
b.cur_typ_c
from record_master a,
Detail_record b
where a.id = p_id
and a.unit_id in (select unit_id from list_home)
and a.unit_c in (select unit_c from list_copy)
and a.id_c = b.id_c
Where record_master is the driving table containing 1 Million reocrd and detail_record has around 1000 record.
Also list_home and list_copy contains around 800 record.
Where p_id is the input from the screen i.e it is variable.
At present the Query is taking around 15 minutes.
There is a index in the table record_master whose order is
( id, unit_id , unit_c, id_c ) .
I am unable to see any improvement in the query because of IN clause in the Query.
Any suggestion is most useful.
Thanks
DR
I Have the following query which i want to tune.
Select
a.add,
a.stamp_updt,
b.cur_typ_c
from record_master a,
Detail_record b
where a.id = p_id
and a.unit_id in (select unit_id from list_home)
and a.unit_c in (select unit_c from list_copy)
and a.id_c = b.id_c
Where record_master is the driving table containing 1 Million reocrd and detail_record has around 1000 record.
Also list_home and list_copy contains around 800 record.
Where p_id is the input from the screen i.e it is variable.
At present the Query is taking around 15 minutes.
There is a index in the table record_master whose order is
( id, unit_id , unit_c, id_c ) .
I am unable to see any improvement in the query because of IN clause in the Query.
Any suggestion is most useful.
Thanks
DR