Database Tuning (MOSC)

MOSC Banner

Odd Query Explain Plan costs

edited Mar 30, 2011 8:23AM in Database Tuning (MOSC) 5 commentsAnswered
Hi, Got a puzzle here ..  I have a select statement that has a very expensive cost and ends up using all the temp tablespace and eventually crashes.  If I add a table to the from clause that has no entries in the select or the where,  the query runs in seconds. How is this possible ?

I'll paste the query here .. maybe I'm missing something .. but this has stumped all Oracle familiar folks we have here.

Removing the bold nested select kills the performance of the query.

Here is the query :

select a.irn, a.name, a.latitude, a.longitude, a.iscollector, '"' || me.error || '"' Error, decode(rc.collector_irn, 0, 1, 0) Orphan, nvl(rc.node_level, 0) nodel_level, (sysdate - a.last_curr_tou) Days, a.last_curr_tou last_connect_time, nvl(rc.collector_irn, 0) collector_irn, nvl(rc.com_path_0, 0) comm_path_0, nvl(rc.com_path_1, 0) comm_path_1, nvl(rc.com_path_2, 0) comm_path_2, nvl(rc.com_path_3, 0) comm_path_3, nvl(rc.com_path_4, 0) comm_path_4, nvl(rc.com_path_5, 0) comm_path_5, nvl(rc.com_path_6, 0) comm_path_6, nvl(rc.com_path_7, 0) comm_path_7, nvl(rc.com_path_8, 0) comm_path_8, nvl(rc.com_path_9, 0) comm_path_9, nvl(rc.com_path_10, 0) comm_path_10, nvl(rc.com_path_11, 0) comm_path_11, nvl(rc.com_path_12, 0) comm_path_12, nvl(rc.com_path_13, 0) comm_path_13, nvl(rc.com_path_14, 0) comm_path_14,

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center