SQL reduce execution time
The below SQL taking 3.5 to 4 Minutes. how I can reduce execution time..
SQL> set autotrace traceonly explain
SQL> select tp.test_instance_id,
2 tp.param_group_id,
3 tpg.parent_param_group_id,
4 MAX(decode(tp.param_name, 'splitterRatio', tp.param_value)) splitterRatio,
5 MAX(decode(tp.param_name, 'maxSplitterLoss', tp.param_value)) maxSplitterLoss,
6 MAX(decode(tp.param_name, 'used', tp.param_value)) used
7 from
8 test_instance ti,
9 test_parameter tp,
10 test_parameter_group tpg
11 where
12 ti.test_instance_id = tp.test_instance_id
13 and ti.test_instance_id = tpg.test_instance_id
14 and tpg.param_group_id = tp.param_group_id