Pages

Tuesday, September 13, 2022

See SQL executions, invalidations, parse_calls.

See SQL invalidations

First step.
Clear shared pool and Buffer Cache.

ALTER SYSTEM FLUSH SHARED_POOL;
ALTER SYSTEM FLUSH BUFFER_CACHE;

Second step.
Check current status
SELECT  sql_text, executions, parse_calls,  invalidations 
  FROM V$SQL 
 WHERE sql_text like 'MERGE into SGA_W_IPN_SUBSCRIBER%';

SELECT sql_text, 
       SUM(executions) executions, 
       SUM(parse_calls) parse_calls, 
       SUM(invalidations) invalidations
  FROM V$SQL 
 WHERE sql_text like 'MERGE into SGA_W_IPN_SUBSCRIBER%'
 GROUP BY sql_text

SELECT sql_id, sql_text, invalidations 
  FROM (
       SELECT sql_id, 
              SUBSTR(sql_text, 1, 80) sql_text, 
              invalidations
         FROM V$SQLAREA
        WHERE 1=1
        ORDER BY invalidations DESC 
       )
WHERE ROWNUM < 11;

No comments:

Post a Comment