SQL Performance (MOSC)

MOSC Banner

Full table scan in X$KKSSQLSTAT when using IN clause.

edited Dec 27, 2017 4:00AM in SQL Performance (MOSC) 6 commentsAnswered

Hi Experts,

Query on v$sqlstats causing v$sqlstats causing "library cache: mutex X" and shared pool latch contention, I know its obvious if the X$KKSSQLSTAT is access it going to cause, but the issue is when IN clause is used its going for FULL table scan, but I if I manually query for single SQL_ID it uses an index, I gather the stats for X$KKSSQLSTAT, tested on 11g R2, same behaviour, Any one any idea.

SELECT sql_id,sql_text from v$sqlstats  WHERE sql_id in (:1 ,:2 ,:3 ,:4

,:5 ,:6 ,:7 ,:8 ,:9 ,:10 )

Plan hash value: 161874334

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

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

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center