|
|
|
|
Re: Query not have much cost on Explain Plan but very very slow [message #639628 is a reply to message #639621] |
Mon, 13 July 2015 02:07 |
John Watson
Messages: 8964 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
It is difficult to tune SQL that one has not seen. Also, please can you use EXPLAIN PLAN and DBMS_XPLAN.DISPLAY to generate the plan, rather than whatever tool you used before?
However, I do see a couple of suspicious constructs.
You are joining and aggregating wod_det, wo_mstr, and wr_route twice and then using union all to concatenate the results. Can't that be accomplished with one factored subquery?
You are aggregating twice: at the level mentioned above, and again at the top. Isn't once enough?
You have an outer join that does not appear to be preserving any rows. Is it actually necessary?
[Updated on: Mon, 13 July 2015 02:08] Report message to a moderator
|
|
|