自治事務提供了很方便的事務控制功能
SQL> CREATE GLOBAL TEMPORARY TABLE T_SESSION_STAT
表已創建
SQL> CREATE TABLE T_RECORD (ID NUMBER
表已創建
SQL> CREATE OR REPLACE PROCEDURE P_TEST AS
過程已創建
SQL> CREATE OR REPLACE PROCEDURE P_TEST_AUTO AS
過程已創建
SQL> SET SERVEROUT OFF
SQL> BEGIN
PL/SQL 過程已成功完成
SQL> TRUNCATE TABLE T_SESSION_STAT;
表被截斷
SQL> SET SERVEROUT ON
SQL> BEGIN
recursive cpu usage
session logical reads
CPU used by this session
enqueue releases
db block gets
db block gets from cache
consistent gets
consistent gets from cache
consistent gets
db block changes
consistent changes
commit cleanout failures: block lost
commit cleanouts
calls to kcmgcs
calls to get snapshot scn: kcmgss
redo size
undo change vector size
commit txn count during cleanout
IMU commits
IMU Flushes
IMU undo allocation size
PL/SQL 過程已成功完成
由於第一次調用匿名塊和過程會產生會導致遞歸調用信息
從二者的差異可以看到
下面修改兩個存儲過程
SQL> CREATE OR REPLACE PROCEDURE P_TEST AS
過程已創建
SQL> CREATE OR REPLACE PROCEDURE P_TEST_AUTO AS
過程已創建
SQL> EXEC P_TEST
PL/SQL 過程已成功完成
SQL> EXEC P_TEST_AUTO
PL/SQL 過程已成功完成
SQL> TRUNCATE TABLE T_SESSION_STAT;
表被截斷
SQL> DELETE T_RECORD;
已刪除
SQL> COMMIT;
提交完成
SQL> BEGIN
opened cursors cumulative
recursive calls
recursive cpu usage
session logical reads
CPU used by this session
enqueue requests
enqueue releases
db block gets
db block gets from cache
consistent gets
consistent gets from cache
consistent gets
db block changes
consistent changes
change write time
free buffer requested
commit cleanout failures: block lost
commit cleanouts
commit cleanouts successfully completed
calls to kcmgcs
calls to kcmgas
calls to get snapshot scn: kcmgss
redo entries
redo size
redo ordering marks
undo change vector size
no work
deferred (CURRENT) block cleanout applications
commit txn count during cleanout
active txn count during cleanout
cleanout
IMU undo allocation size
IMU Redo allocation size
table scans (short tables)
table scan rows gotten
table scan blocks gotten
cluster key scans
cluster key scan block gets
index fetch by key
heap block compress
session cursor cache hits
buffer is not pinned count
parse count (total)
execute count
PL/SQL 過程已成功完成
IMU是
SQL> TRUNCATE TABLE T_SESSION_STAT;
表被截斷
SQL> BEGIN
recursive calls
session logical reads
db block gets
db block gets from cache
db block changes
redo entries
redo size
undo change vector size
IMU undo allocation size
IMU Redo allocation size
execute count
PL/SQL 過程已成功完成
可見
From:http://tw.wingwit.com/Article/program/Oracle/201311/17919.html