Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

column PARENT_ID of V$SQL_PLAN: wrong values? parent_id = 0 with depth > 1?

asyOct 14 2014 — edited Oct 14 2014

Today I selected an execution plan from an SQL statement recently executed. I used:

select

id, parent_id,

lpad (' ', 3*depth) || operation || ' ' || options ||

decode (object\_name, null, null, ' on ' || object\_owner || '.' || object\_name) **op**

from v$sql_plan

where sql_id = :sql_id and child_number = :child_number

order by id;

and analyzed it automatically. My newly-written procedure threw assertions telling me the structure is corrupt: the links by parent_id do not match the depth.

The depth seems to be correct, the parent_id seems sometimes zeroed.

Am I missing something?

1.PNG

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 11 2014
Added on Oct 14 2014
3 comments
2,713 views