Trouble shooting for Pin S wait on X
Pin S wait on X is usually due to high parses. So check for high parsing sqls or tune application to share cursors. For further diagnosis, please review following note: Note:1349387.1 Trouble shooting 'Cursor: Pin S wait on X' wait
It's usually due to high analysis. So check the high resolution sqls or adjust the application sharing cursor. For further diagnosis, please see the following considerations: Note:1349387.1 Trouble shooting 'Cursor: Pin S wait on X' wait
What causes' Cursor: pin S wait on X' waits?
* Firstly, ensure that the shared pool is sized correctly.
If the shared pool is under sized or under load generally, this may manifest itself as' Cursor: pin S wait on X'. If Automatic Memory Management is being used then this should not normally be an issue. See:
Document 443746.1 Automatic Memory Management (AMM) on 11g
* Frequent Hard Parses
If the frequency of Hard Parsing is extremely high, then contention can occur on this pin.
* High Version Counts
When Version counts become excessive, a long chain of versions needs to be examined and this can lead to contention on this event
* Known bugs
* Parse Errors, as following note indicates:
Document 1353015.1 How to Identify Hard Parse Failures
Solution:
Select p2raw from v$session where event = 'cursor: pin S wait on X'
Select p2raw
To_number (substr (to_char (rawtohex (p2raw)), 1,8), 'XXXXXXXX') sid
From v$session
Where event = 'cursor: pin S wait on X'
Select sid
Serial#
SQL_ID
STATUS
STATE
BLOCKING_SESSION
BLOCKING_SESSION_STATUS
EVENT
From v$session
Where SID = & sid
As a result of Bug 7568642 BLOCKING_SESSION EMPTY FOR "CURSOR: PIN S WAIT ON X" the blocking_session is not populated in 10.2.The bug is fixed in 11g R1.
Blocking_session was not populated in 7568642 because error 10.2 BLOCKING_SESSION is empty when the wait event is "CURSOR:PIN S WAIT ON X". The error is fixed in 11g R1
In 11g and 12g, the blocking session can be found directly using the following sql:
In 11g and 12g, you can use the following sql to find the blocking session directly
Select sid
Serial#
SQL_ID
BLOCKING_SESSION
BLOCKING_SESSION_STATUS
EVENT
From v$session
Where event = 'cursor: pin S wait on X'