查询当前数据库设定的值:
SQL> show parameter session_cached_cursor
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
session_cached_cursors integer 50
修改该参数:
SQL> alter system set session_cached_cursors=100 scope=spfile;
System altered
该参数为静态参数,调整后要重启库才生效。
参数session_cached_cursors应该设置多大
检查这个参数是否设置的合理,可以从两个statistic来检查。
SQL> select name,value from v$sysstat where name like '%cursor%';
NAME VALUE
---------------------------------------------------------------- ----------
opened cursors cumulative 50946
opened cursors current 72
pinned cursors current 17
session cursor cache hits 44279
session cursor cache count 3173
cursor reload failures 11
cursor authentications 809
7 rows selected
SQL> select name,value from v$sysstat where name like '%parse%';
NAME VALUE
---------------------------------------------------------------- ----------
ADG parselock X get attempts 0
ADG parselock X get successes 0
parse time cpu 996
parse time elapsed 2246
parse count (total) 20356
parse count (hard) 3340
parse count (failures) 17
parse count (describe) 14
8 rows selected