Yindan Wang, August 24, 2007 - 2:01 am UTC
Thanks.TOM
Sorry,maybe I didn't express myself clearly.I have a sql statement ,we schedule it to run every day.So I am pretty sure the true plan of this statement must be in the library cache and I can query the plan by its sqlid every day.But last week I can not find this statement's plan by sqlid from v$sql_plan and seemed I did not do anything.So I want to know what operation may cause the plan out of v$sql_plan?Thanks.
August 24, 2007 - 2:59 pm UTC
lots of things
tons of things
too many things to enumerate
you should just realize that plans come, they go, they are not persistent - they are transient.
Normal shared pool aging
Squeezed for space in the shared pool
Privilege changes
DDL operations
statistics manipulation
lots and lots of stuff.
v$sql_plan information
jatin, April 20, 2011 - 3:29 pm UTC
Sir
I want to undersntand how do I interpret the information in v$sql_plan.
I understand that v$sql_plan shows information on each child cursor loaded into library cache. Can you please help me understand what does that mean for a single sql executed say 1000 times - why is it showing 25 different rows for this 1 sql:
SQL_ID PLAN_HASH_VALUE CHILD_NUMBER OBJECT_OWNER OBJECT_NAME COST CPU_COST TIME
------------- --------------- ------------ ------------------------------ ------------------------------ ---------- ---------- ----------
0j06hs4gysj7q 86531355 1 765
0j06hs4gysj7q 86531355 1 SVCWCMADMIN02 PK_DOCMETA 1 7055 1
0j06hs4gysj7q 86531355 1 765 135409972 6
0j06hs4gysj7q 86531355 1 763 135396731 6
0j06hs4gysj7q 86531355 1 761 135365766 6
0j06hs4gysj7q 86531355 1 759 135334800 6
0j06hs4gysj7q 86531355 1 755 135303784 6
0j06hs4gysj7q 86531355 1
0j06hs4gysj7q 86531355 1 754 135295423 6
0j06hs4gysj7q 86531355 1 SVCWCMADMIN02 GSAINDEXLOG 72 22921184 1
0j06hs4gysj7q 86531355 1 SVCWCMADMIN02 REVISIONS 681 104430664 5
0j06hs4gysj7q 86531355 1 SVCWCMADMIN02 DOCTYPES 1 8361 1
0j06hs4gysj7q 86531355 1 SVCWCMADMIN02 PK_DOCTYPES 0 1050
0j06hs4gysj7q 86531355 1 SVCWCMADMIN02 DOCUMENTS 4 31015 1
0j06hs4gysj7q 86531355 1 SVCWCMADMIN02 DID_2 2 15693 1
0j06hs4gysj7q 86531355 1 SVCWCMADMIN02 DOCUMENTS 2 30966 1
0j06hs4gysj7q 86531355 1 SVCWCMADMIN02 DID_2 2 15693 1
0j06hs4gysj7q 86531355 1 SVCWCMADMIN02 DOCUMENTS 2 30966 1
0j06hs4gysj7q 86531355 1 SVCWCMADMIN02 DID_2 2 15693 1
0j06hs4gysj7q 86531355 1 SVCWCMADMIN02 DOCMETA 2 13240 1
0j06hs4gysj7q 86531355 1
Do I interpret it as 1 child cursor per row - if so why.
Thanks
April 25, 2011 - 7:45 am UTC
It is a plan in there, you use dbms_xplan to display it.
select * from table(dbms_xplan.display_cursor( '0j06hs4gysj7q', 1 ) );