_cursor_obselete_threshold Oracle Database 19c

Problem Statement 


Recently came across one interesting issue where we found _cursor_obselete_threshold parameter having the value of 8192 causing database performance issues.


On investigation, it was found this parameter value is the maximum limit for obsoleting the parent cursors in a multitenant environment and cannot be increased beyond 8192. This default value of the parameter is increased heavily from 1024 to 8192. 


Parameter _cursor_obselete_threshold was first introduced in version 11.2.0.3 with default to 100 and then increased to 1024 in 11.2.0.4 and remains the same until 12.1. From 12.2 onwards to support 4096 PDB which was only 252 PDB till 12.1 this parameter default value is changed to 8192.


In some cases, it is observed high version counts for SQL statement post-upgrade to 12.2 or 19c causing database performance slowness. Those using a lesser number of PDB in their environment do not need to for this much high value and cause set this to 1024.


How to identify whether your database is hitting the same problem?


    1. Check whether you see a high number of wait in AWR for event cursor: mutex X

    2. Check the "SQL ordered by Version count" section of AWR Report and notice SQL having a version count greater than 1024.

    3. High parse time post-upgrade.

    4. Too many reloads in SQL Area due to space pressure in the shared pool due to excessive child cursors.

    5. AMM or ASMM shows extreme memory pressure for shared pools in SGA. 


Solution:


            alter system set "_cursor_obsolete_threshold=1024" scope=spfile;


References:


High Version counts for SQL Statements (Doc ID 2431353.1)

Comments

Popular posts from this blog

How to Solve - "WAIT FOR EMON PROCESS NTFNS"

Query Regression - "OR" Transformation Oracle 19c

ORA - 12537: TNS: connection closed