free
chain
oracle 中存在大量的chain
chain的好处:可以连起来数据库中的块,其次可以使得块被遍历。
oracle 对链进行保护,oracl
e使用到
latch。
17:45:40 SQL> select count(*) from x$ksmsp;
COUNT(*)
----------
52410
Elapsed: 00:00:00.78
17:46:05 SQL> select count(*) from dba_indexes;
COUNT(*)
----------
2360
Elapsed: 00:00:00.36
17:53:52 SQL> select count(*) from x$ksmsp;
COUNT(*)
----------
52426
Elapsed: 00:00:00.03
说明发生硬解析,我们的trunck增多了。
17:54:02 SQL> select name ,value from v$sysstat where name like \'parse%\'; NAME VALUE -------------------------------------------- ---------- parse time cpu 474 parse time elapsed 1785 parse count (total) 66763 parse count (hard) 3916 parse count (failures) 158
17:56:53 SQL> alter system flush shared_pool; System altered. 18:02:17 SQL> select count(*) from x$ksmsp; COUNT(*) ---------- 7774
ORA-4031错误马
上就变少了,但不是根本的解决办法。
ORA-4031产生的原因就是大量的硬解析,需要大量的free区中的块,但是不够了... ...
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29990276/viewspace-1357669/ ,如需转载,请注明出处,否则将追究法律责任。