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!

Why the plan of insert SQL doesn't show up in v$sql_plan in 10g?

24040May 25 2011 — edited May 25 2011
SQL> drop table ttt;

Table dropped.

SQL> create table ttt(x varchar2(100));

Table created.

SQL>  insert into ttt values('CatchSQLPlan');

1 row created.

SQL>  select sql_text , sql_id from v$sql where sql_text like '%CatchSQLPlan%' and sql_text not like '%select%';

SQL_TEXT
--------------------------------------------------------------------------------
SQL_ID
-------------
 insert into ttt values('CatchSQLPlan')
bx2c6kcp0bzcg


SQL>  select count(*) from v$sql_plan where sql_id='bx2c6kcp0bzcg';

  COUNT(*)
----------
         0

SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE    10.2.0.4.0      Production
TNS for Solaris: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production

SQL>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 22 2011
Added on May 25 2011
4 comments
423 views