Full table scan in X$KKSSQLSTAT when using IN clause.
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 |