-
sql tunning
Hi Guys,
Can any one suggest me to tune the below SQL.
select
a.field,
c.well,
c.hole_no,
a.conduit,
d.production_interval,
b.daytime,
--valid_ind,
b.attribute_name,
b.attribute_value
From
v_re_conduit a,
v_re_conduit_sample_attr b,
v_re_completion c,
v_re_bore d
where a.object_id = b.object_id
and b.object_id = d.conduit_object_id
and a.completion_object_id = c.object_id
and a.well_object_id = c.well_object_id
and b.daytime >= add_months (sysdate, -9)
and c.end_date is null
and a.end_date is null
and b.attribute_name in ('BSW', 'SAND')
The explain is below:
=====================
PLAN
--------------------------------------------------------------------------------
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
TABLE ACCESS BY INDEX ROWID OBJECTS
INDEX RANGE SCAN I_OBJECTS_1
PLAN
--------------------------------------------------------------------------------
TABLE ACCESS BY INDEX ROWID OBJECTS_ATTRIBUTE
INDEX RANGE SCAN PK_OBJECTS_ATTRIBUTE
TABLE ACCESS BY INDEX ROWID OBJECT_EVENT_ANALYSIS
INDEX RANGE SCAN UK_OBJECT_EVENT_ANALYSIS_1
TABLE ACCESS BY INDEX ROWID WELL
INDEX UNIQUE SCAN UK_WELL_1
TABLE ACCESS BY INDEX ROWID WELL
INDEX UNIQUE SCAN UK_WELL_1
TABLE ACCESS BY INDEX ROWID WELL
INDEX UNIQUE SCAN UK_WELL_1
TABLE ACCESS BY INDEX ROWID WELL_ATTRIBUTE
PLAN
--------------------------------------------------------------------------------
INDEX RANGE SCAN I_WELL_ATTRIBUTE_2
INDEX RANGE SCAN PK_WEBO_BORE
TABLE ACCESS BY INDEX ROWID WELL_ATTRIBUTE
INDEX RANGE SCAN I_WELL_ATTRIBUTE_2
TABLE ACCESS BY INDEX ROWID WELL_ATTRIBUTE
INDEX RANGE SCAN I_WELL_ATTRIBUTE_2
thanks in advance.
Cheers,
Vinod
-
Well I doubt if the plan is of the SQL u want to tune..
BTW, why dont u put the plan in "code and /code"
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
-
Thanks for your Wonderful suggestion.
I think u will fix the probs as you have replied.
Anyway the problem is found & fixed.
No Worries.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|