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!

Find child cursors due to change in execution plan

user9056222Sep 30 2014 — edited Oct 3 2014

Hello All,

I have a situation to provide the list of execution plan's for a particular SQL_ID. The particular SQL flips between 2 access paths (FTS and Index Scans) but at that point of time, I can see only one (current) plan_hash_value for the statement. i.e - the previous cursor gets invalidated ( due to some application package that runs statistics which in turn invalidates the previous cursor - This is my guess).

I can get it from dba_hist_sqlstat for the particular SQL, but curious to know is that possible to get it from dynamic views like V$SQL and V$SQLAREA to list all plan_hash_values for a particular SQL, where the child_number is 0.

Any idea please?

Note: I am interested in fetching child cursors due to different execution plan's and not child cursors created due to different settings for the same plan(e.g-optimizer mode etc..)

This post has been answered by Hemant K Chitale on Sep 30 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 31 2014
Added on Sep 30 2014
17 comments
3,132 views