ursor_sharing=SIMILAR 引发大量的 cursor: mutex S

简介: 今天一个朋友的数据库11.2.0.1 遇到这个问题,导致业务大面积的瘫痪查看等待如下:   IN_NUM EVENT_NAME                                                       NOW_SNAP_ID...
今天一个朋友的数据库11.2.0.1 遇到这个问题,导致业务大面积的瘫痪查看等待如下:
  IN_NUM EVENT_NAME                                                       NOW_SNAP_ID NOW_WAITED_TOTAL WAIT_TIME_MICRO    ROW_NUM
---------- ---------------------------------------------------------------- ----------- ---------------- --------------- ----------
         1 cursor: mutex S                                                         8196     574159937294    113469206148          1
         1 DB CPU                                                                  8196     264925348737     94172222209          2
         1 library cache lock                                                      8196     377415652600     58003457267          3
         1 direct path read                                                        8196      16531321401      4584378285          4
         1 db file sequential read                                                 8196       2798779765      1387124732          5 

默认一小时的AWR event
可以看到基本处于崩溃的边缘,其原因MOS解释如下:

GOAL

Customer upgraded the DB Repository for Oracle Waveset from Oracle 10g to  Oracle 11g.  
Cursor sharing was set to SIMILAR as per the Oracle Waveset Documentation in 10g.
Child cursors were getting released in 10g. Customer noticed child cursors were not getting released in 11g.

Cursor Mutex S wait event and too many child cursors open when cursor sharing is set to similar.

As per the documentation in MOS 1169017.1 cursor sharing should be exact or force.

SOLUTION

The recommendation to set the 'cursor_sharing' option as 'SIMILAR' was to remedy the known issues when 'cursor_sharing' was set to be the default 'EXACT' option in previous versions of Oracle Waveset and Oracle 10g as repository.

Since the Oracle 11g database deprecates the 'SIMILAR' option, the recommendation now is to set 'cursor_sharing' to 'FORCE'.

REFERENCES

BUG:13983028  - RECOMMENDATION FOR CURSOR_SHARING PARAMETER WITH ORACLE 11G REPOSITORY

记录一下
目录
打赏
0
0
0
0
91
分享
相关文章
Single linked list by cursor
有了指针实现看似已经足够了,那为什么还要有另外的实现方式呢?原因是诸如BASIC和FORTRAN等许多语言都不支持指针,如果需要链表而又不能使用指针,那么就必须使用另外的实现方法。还有一个原因,是在ACM-ICPC,OI等竞赛中,比赛时间有限,用指针写起来太费事,而且数量不多的情况下,用数组实现的脸变运行速度会更快。
967 0
[20160517]11GR2Cursor_Sharing=force的bug
[20160517]11GR2Cursor_Sharing=force的bug.txt --链接https://jonathanlewis.wordpress.com/2016/05/16/cursor_sharing-problem/,重复测试: 1.
953 0
[20150705]使用CURSOR_SHARING_EXACT提示
[20150705]使用CURSOR_SHARING_EXACT提示.txt --生产系统有一条sql语句遇到性能问题,由于生产系统语句非常复杂,我拿测试用户scott的表作为例子来说明: 1.
1010 0
[20150513]函数索引与CURSOR_SHARING=FORCE
[20150513]函数索引与CURSOR_SHARING=FORCE.txt --经常awr报表,大量听到的建议是你们的应用没有使用绑定变量.国内的许多项目这个问题更加严重,我敢打赌国内80%甚至更高的比例在 --应用中没有绑定变量(OLTP系统).
828 0
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等