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!

cannot fetch plan for SQL_ID

user10274093Oct 9 2013 — edited Oct 9 2013

Hi all,

and Thanks for help.

on 11.2.0.3 on Win 2008 server I run

explain plan for

select machine, sid, osuser from v$session ;

select * from table(dbms_xplan.display_cursor(null,null,'ALLSTATS'));

And I receive :

NOTE: cannot fetch plan for SQL_ID: 382zzpu0dtfwn, CHILD_NUMBER: 2                                                                                                                                                                                                                                          

Please verify value of SQL_ID and CHILD_NUMBER;

But if I run

explain plan for

select machine, sid, osuser from v$session ;

-SELECT PLAN_TABLE_OUTPUT FROM TABLE(DBMS_XPLAN.DISPLAY());

It would be OK and I have EXPLAIN PLAN :

Plan hash value: 644658511                                                                                                                                                                                                                                                                                  

                                                                                                                                                                                                                                                                                                            

---------------------------------------------------------------------------------------------                                                                                                                                                                                                               

| Id  | Operation                 | Name            | Rows  | Bytes | Cost (%CPU)| Time     |                                                                                                                                                                                                               

---------------------------------------------------------------------------------------------                                                                                                                                                                                                               

|   0 | SELECT STATEMENT          |                 |     1 |   142 |     0   (0)| 00:00:01 |                                                                                                                                                                                                               

|   1 |  NESTED LOOPS             |                 |     1 |   142 |     0   (0)| 00:00:01 |                                                                                                                                                                                                               

|   2 |   NESTED LOOPS            |                 |     1 |   129 |     0   (0)| 00:00:01 |                                                                                                                                                                                                               

|*  3 |    FIXED TABLE FULL       | X$KSUSE         |     1 |   103 |     0   (0)| 00:00:01 |                                                                                                                                                                                                               

|*  4 |    FIXED TABLE FIXED INDEX| X$KSLWT (ind:1) |     1 |    26 |     0   (0)| 00:00:01 |                                                                                                                                                                                                               

|*  5 |   FIXED TABLE FIXED INDEX | X$KSLED (ind:2) |     1 |    13 |     0   (0)| 00:00:01 |                                                                                                                                                                                                               

---------------------------------------------------------------------------------------------                            

What is the problem ? Thanks for help.                                                                                                                                                                                  

This post has been answered by Dom Brooks on Oct 9 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 6 2013
Added on Oct 9 2013
3 comments
5,463 views