35.Oracle深度学习笔记——关于dbms_shared_pool. MARKHOT
欢迎转载,转载请标明出处:http://blog.csdn.net/notbaron/article/details/50859148
BMS_SHARED_POOL包提供存储过程来将PL/SQL对象或SQL游标固定到Oracle 共享池。一旦这些对象固定之后,将不再参与aged out,而
是常驻内存,即便是使用alter system flush shared_pool也不会将对象清除出共享池。
中的过程命令如下:
idle> desc dbms_shared_pool;
PROCEDURE ABORTED_REQUEST_THRESHOLD
Argument Name Type In/Out Default?
----------------------------------------------------- ------ --------
THRESHOLD_SIZE NUMBER IN
PROCEDURE KEEP
Argument Name Type In/Out Default?
----------------------------------------------------- ------ --------
NAME VARCHAR2 IN
FLAG CHAR IN DEFAULT
PROCEDURE KEEP
Argument Name Type In/Out Default?
------------------------------ ----------------------------- --------
SCHEMA VARCHAR2 IN
OBJNAME VARCHAR2 IN
NAMESPACE NUMBER IN
HEAPS NUMBER IN
PROCEDURE KEEP
Argument Name Type In/Out Default?
----------------------------------------------------- ------ --------
HASH VARCHAR2 IN
NAMESPACE NUMBER IN
HEAPS NUMBER IN
PROCEDURE MARKHOT
Argument Name Type In/Out Default?
----------------------------------------------------- ------ --------
SCHEMA VARCHAR2 IN
OBJNAME VARCHAR2 IN
NAMESPACE NUMBER IN DEFAULT
GLOBAL BOOLEAN IN DEFAULT
PROCEDURE MARKHOT
Argument Name Type In/Out Default?
----------------------------------------------------- ------ --------
HASH VARCHAR2 IN
NAMESPACE NUMBER IN DEFAULT
GLOBAL BOOLEAN IN DEFAULT
PROCEDURE PURGE
Argument Name Type In/Out Default?
----------------------------------------------------- ------ --------
NAME VARCHAR2 IN
FLAG CHAR IN DEFAULT
HEAPS NUMBER IN DEFAULT
PROCEDURE PURGE
Argument Name Type In/Out Default?
----------------------------------------------------- ------ --------
SCHEMA VARCHAR2 IN
OBJNAME VARCHAR2 IN
NAMESPACE NUMBER IN
HEAPS NUMBER IN
PROCEDURE PURGE
Argument Name Type In/Out Default?
----------------------------------------------------- ------ --------
HASH VARCHAR2 IN
NAMESPACE NUMBER IN
HEAPS NUMBER IN
PROCEDURE SIZES
Argument Name Type In/Out Default?
------------------------------ ----------------------------- --------
MINSIZE NUMBER IN
PROCEDURE UNKEEP
Argument Name Type In/Out Default?
----------------------------------------------------- ------ --------
NAME VARCHAR2 IN
FLAG CHAR IN DEFAULT
PROCEDURE UNKEEP
ArgumentName Type In/Out Default?
----------------------------------------------------- ------ --------
SCHEMA VARCHAR2 IN
OBJNAME VARCHAR2 IN
NAMESPACE NUMBER IN
PROCEDURE UNKEEP
Argument Name Type In/Out Default?
----------------------------------------------------- ------ --------
HASH VARCHAR2 IN
NAMESPACE NUMBER IN
PROCEDURE UNMARKHOT
Argument Name Type In/Out Default?
----------------------------------------------------- ------ --------
SCHEMA VARCHAR2 IN
OBJNAME VARCHAR2 IN
NAMESPACE NUMBER IN DEFAULT
GLOBAL BOOLEAN IN DEFAULT
PROCEDURE UNMARKHOT
Argument Name Type In/Out Default?
----------------------------------------------------- ------ --------
HASH VARCHAR2 IN
NAMESPACE NUMBER IN DEFAULT
GLOBAL BOOLEAN IN DEFAULT
This procedure marks a library cache objectas a hot object.
语法如下:
DBMS_SHARED_POOL.MARKHOT (
schema VARCHAR2,
objname VARCHAR2,
namespace NUMBER DEFAULT1, global BOOLEAN DEFAULT TRUE);
DBMS_SHARED_POOL.MARKHOT (
hash VARCHAR2,
namespace NUMBER DEFAULT 1,
global BOOLEAN DEFAULTTRUE);
也可以使用KEEP过程
SELECT * FROM v$db_object_cache;