Get the App
SLTechnology News&Howtos  ›  Database  › 

Trouble shooting for Pin S wait on X

Shulou Source: shulou.com Published: 2022-06-01 06:51:39 10月01日 Update

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'

Tags: Errors events events applications precautions cursors programs empty faceted high scores one application check adjustment blocking Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Shulou Information vpn Microsoft Linux