cursor: pin S wait on X
864527May 25 2011 — edited Aug 24 2011We are on 10.2.0.4. We experienced a random lockup of some queries referenced in the finding from addm report below. Also, a stats job was running at the same time. Is a wait time of 1466 seconds normal? We've experienced sporadic events like this in the past, but we have never been able to determine the root cause. Our dba says we have too many sessions executing the same query. We are on 3 node RAC with 8 cpus/node on AIX. We are a fairly large OLTP and the query in question is executed frequently, so I'm puzzled why it shows up sporadically like this...
Any help is appreciated. There isn't much on this topic on google, but most refrences to "cursor: pin S wait on X" show up with a reference to a stats job and some oracle bug, but most reference version 10.2.0.3 and we are on 10.2.04...
FINDING 1: 65% impact (442097 seconds)
--------------------------------------
SQL statements consuming significant database time were found.
RECOMMENDATION 1: SQL Tuning, 40% benefit (275493 seconds)
ACTION: Investigate the SQL statement with SQL_ID "9t3w492u0xdhb" for
possible performance improvements.
RELEVANT OBJECT: SQL statement with SQL_ID 9t3w492u0xdhb and
PLAN_HASH 3763850175
SELECT DISTINCT id , name FROM accounts WHERE
(id= :1 AND invalid = :2) ORDER BY id, name
RATIONALE: SQL statement with SQL_ID "9t3w492u0xdhb" was executed 120
times and had an average elapsed time of 1466 seconds.
RATIONALE: Waiting for event "cursor: pin S wait on X" in wait class
"Concurrency" accounted for 97% of the database time spent in
processing the SQL statement with SQL_ID "9t3w492u0xdhb".
RATIONALE: Waiting for event "library cache lock" in wait class
"Concurrency" accounted for 1% of the database time spent in
processing the SQL statement with SQL_ID "9t3w492u0xdhb".