v$sqlarea之parse_calls及loads
---會話1
SQL> show user
USER is "TBL_BCK"
--會話1執行plsql程式碼
SQL> declare
2 v_out pls_integer;
3 begin
4 for i in 1..1000 loop
5 select count(a) into v_out from t_load;
6 end loop;
7 end;
8 /
PL/SQL procedure successfully completed.
--會話2
SQL> select sql_text,loads,parse_calls from v$sqlarea where sql_id=(select nvl(sql_id,prev_s
ql_id) from v$session where sid=43);
SQL_TEXT
--------------------------------------------------------------------------------
LOADS parse_calls
---------- ---------
declare v_out pls_integer; begin for i in 1..1000 loop select count(a) into v_ou
t from t_load; end loop; end;
1 1
--會話1重複執行上述的plsql程式碼
SQL> declare
2 v_out pls_integer;
3 begin
4 for i in 1..1000 loop
5 select count(a) into v_out from t_load;
6 end loop;
7 end;
8 /
PL/SQL procedure successfully completed.
---會話2可以發現軟解析loads還是1
SQL> /
SQL_TEXT
--------------------------------------------------------------------------------
LOADS parse_calls
---------- ----
declare v_out pls_integer; begin for i in 1..1000 loop select count(a) into v_ou
t from t_load; end loop; end;
1 1
--會話3重新整理共享池
SQL> alter system flush shared_pool;
System altered.
--會話1重複執行重新整理共享後的上述的plsql程式碼
SQL> declare
2 v_out pls_integer;
3 begin
4 for i in 1..1000 loop
5 select count(a) into v_out from t_load;
6 end loop;
7 end;
8 /
PL/SQL procedure successfully completed.
--會話2可知load在原來的基礎上累加,即++1
SQL> /
SQL_TEXT
--------------------------------------------------------------------------------
LOADS parse_calls
---------- ----
declare v_out pls_integer; begin for i in 1..1000 loop select count(a) into v_ou
t from t_load; end loop; end;
2 1
小結:1,parse_calls僅會在硬解析增加值
2,loads則會在重新整理共享池後增加其值
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-762248/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- V$SQLAREASQL
- V$SQLAREA解析SQL
- v$sql v$sqlarea v$sql_shared_cursor及遊標SQL
- V$SQL、V$SQLSTATS、V$SQLAREASQL
- V$SQLAREA的用法SQL
- v$sql,v$sqlarea,v$sqltext區別SQL
- Oracle動態效能檢視學習之v$sqltext & v$sqlareaOracleSQL
- V$SQL 和V$SQLAREA區別SQL
- v$sql v$sqlarea v$sql_shared_cursor及父遊標,子游標SQL
- v$sql和v$sqlarea的區別SQL
- V$sql_text v$sqlarea v$sql 的區別SQL
- V$SQLAREA 檢視TOP_SQLSQL
- v$sqlarea,v$sql,v$sqltext的區別和聯絡SQL
- v$sqlarea,v$sql,v$sqltext三個檢視的區別SQL
- v$sqlarea,v$sql,v$sqltext的區別和聯絡(zt)SQL
- v$sql檢視和v$sqlarea檢視的構建SQL
- 【Oracle九大效能檢視】之2.v$sqlarea_查效能SQLOracleSQL
- v$sqlarea_parent cursor_v$sql_child cursor關係SQL
- (轉):學習Oracle動態效能表-(7)-V$SQLTEXT,V$SQLAREAOracleSQL
- [轉]學習Oracle動態效能表-(6)-V$SQLTEXT,V$SQLAREAOracleSQL
- 檢視 v$sql,v$sqlarea,$sqltext,v$sqltext_with_newlines 的差異SQL
- 學習動態效能表(四)-(2)-V$SQLAREASQL
- oracle11g v$sql_v$sqlarea_version_count測試OracleSQL
- v$sql v$sqlarea和父遊標 子游標記載01SQL
- cursor_sharing與v$sqlarea_v$sql_v$sql_shared_cursorSQL
- sql執行計劃_v$sqlarea_v$sql_v$sql_shared_cursorSQL
- (轉):學習Oracle動態效能表-(1)-V$SQLAREAOracleSQL
- Oracle9i中v$sql、v$sqlarea、v$sqltext、v$sql_plan的聯絡與區別OracleSQL
- [ZT]v$sqlarea,v$sql,v$sqltext這三個檢視提供的sql語句有什麼區別SQL
- v$sqlarea_parse_calls與executions與session_cached_cursors關係SQLSession
- [20120425]PLAN_HASH_VALUE與 V$SQLAREA.txtSQL
- load和loads的區別
- 授權某使用者,檢視動態效能檢視的許可權(如v$latch,v$lock,v$sqlarea,v$sql,v$sysstat)SQL
- 通過 v$sqlarea 查詢disk read嚴重(I/O)的SQL-- Oracle效能檢視SQLOracle
- Python中dumps, loads dump, load用法詳解Python
- Python教程:json中load和loads的區別PythonJSON
- v$session之小測試(一)_與v$lockSession
- v$session之小測試(二)_與v$sqlSessionSQL