Skip to content
March 30, 2018 / doganay

X$KQLFXPL FULL TABLE SCAN WHEN SELECTING V$SQL_PLAN


Problem:

A friend reported this runs slow on 11.2.0.4:
select * from v$sql_plan where sql_id=trim(’83gvu1ba2x95y ‘);

Plan was:

OPERATION           OBJECT_NAME        
-----------------   ------------
SELECT STATEMENT                       
 FIXED TABLE FULL   X$KQLFXPL   

In a normal case (select * from v$sql_plan where sql_id=’83gvu1ba2x95y’) must be:

                 
OPERATION                  OBJECT_NAME        
-------------------------  -----------------
SELECT STATEMENT                              
 FIXED TABLE FIXED INDEX   X$KQLFXPL (ind:4)


Solution:

select /*+ cursor_sharing_exact */ * from v$sql_plan where sql_id=trim('83gvu1ba2x95y ');

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: