Tuesday, October 8, 2019

How to flush shared pool


select address, hash_value from v$sqlarea
where sql_text = ‘select count(c2) from skew where c1 = :bind’;
ADDRESS HASH_VALUE
——– ———-
27308318 2934790721

exec DBMS_SHARED_POOL.PURGE ('00000008BB871740, 3842003817', 'C');
on you database


reason is that this SQL has produced many versions, appears to be bug in CS as on other databases we see only 1 or 2
10:03:04 SQL> select parsing_schema_name, version_count from v$sqlarea where sql_id='ak6up2gkh0nv9';

PARSING_SCHEMA_NAME            VERSION_COUNT
------------------------------ -------------
OPS$ORACLE                             57448


ak6up2gkh0nv9 select a.MRP, b.InTraf from (select decode(count(1), 0, 'N', 'Y') MRP from v$session where program like '%MRP%' and type='BACKGROUND') a, (select count(1) InTraf from gv$session where machine like '%occ%' or machine like '%paypal.com%' or machine like '%etl%') b



=== verification


select ADDRESS, HASH_VALUE from V$SQLAREA where SQL_ID = 'ak6up2gkh0nv9';

should return none



No comments: