修改open_cursors和session_cached_cursors的引數值
用oracle 的ADDM生產了報告,其中建議修改open_cursors和session_cached_cursors的引數值。
如:
FINDING 3: 15% impact (1673 seconds)
------------------------------------
Soft parsing of SQL statements was consuming significant database time.
RECOMMENDATION 1: Application Analysis, 15% benefit (1673 seconds)
ACTION: Investigate application logic to keep open the frequently used
cursors. Note that cursors are closed by both cursor close calls and
session disconnects.
RECOMMENDATION 2: DB Configuration, 15% benefit (1673 seconds)
ACTION: Consider increasing the maximum number of open cursors a session
can have by increasing the value of parameter "open_cursors".
ACTION: Consider increasing the session cursor cache size by increasing
the value of parameter "session_cached_cursors".
RATIONALE: The value of parameter "open_cursors" was "300" during the
analysis period.
RATIONALE: The value of parameter "session_cached_cursors" was "20"
during the analysis period.
SYMPTOMS THAT LED TO THE FINDING:
SYMPTOM: Contention for latches related to the shared pool was consuming
significant database time. (30% impact [3316 seconds])
INFO: Waits for "latch: library cache" amounted to 12% of database
time.
Waits for "library cache pin" amounted to 4% of database time.
Waits for "latch: shared pool" amounted to 13% of database
time.
SYMPTOM: Wait class "Concurrency" was consuming significant database
time. (36% impact [3882 seconds])
SQL> show parameter cursors
NAME TYPE VALUE
------------------------------------ ----------- -----------------------
open_cursors integer 300
session_cached_cursors integer 20
SQL>
alter system set open_cursors=1500 scope=both;
alter system set session_cached_cursors=100 scope=spfile; (初始化檔案使用了spfile)
open_cursors:該引數含義是同一個session同時開啟最多在使用的遊標數。
在Oracle10.2.0.1.0版本中預設為300;
session_cached_cursors:SESSION_CACHED_CURSORS,就是說的是一個session可以快取多少個cursor,讓後續相同的SQL語句不再開啟遊標,從而避免軟解析的過程來提高效能。(繫結變數是解決硬解析的問題),軟解析同硬解析一樣,比較消耗資源.所以這個引數非常重要。
在Oracle10.2.0.1.0版本中預設為20
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12778571/viewspace-573243/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 關於open_cursors和session_cached_cursors的引數值Session
- 引數 session_cached_cursors 與 open_cursors詳解Session
- open_cursors與session_cached_cursorsSession
- 引數SESSION_CACHED_CURSORSSession
- Execute to Parse% 及open_cursors,session_cached_cursorsSession
- 9i資料庫下修改session_cached_cursors引數資料庫Session
- 初始化引數OPEN_CURSORS的理解加深
- 正確設定open_cursors和'session_cached_cursors' 可以減少sql解析SessionSQL
- 結構體引數的傳遞以及如何修改指標引數的值結構體指標
- 引數session_cached_cursors的詳細解釋(zt)Session
- 2.7.6.2 設定或修改初始化引數的值
- 受困於一個引數:session_cached_cursorsSession
- js如何獲取url所傳遞的引數和引數值JS
- 引數session_cached_cursors的工作原理及優缺點分析Session
- 深入解析 ES6:Rest 引數和引數預設值REST
- Oracle 11gR2 調整session_cached_cursors引數OracleSession
- jmeter 如何在請求之前修改 post body 裡面的引數的值JMeter
- c# 方法引數_值引數C#
- ABAP 方法呼叫的引數傳遞裡,透過引用傳遞的方式,能修改原始引數值嗎?
- C#中的值引數,引用引數及輸出引數C#
- 【最佳化】引數SESSION_CACHED_CURSORS與解析之間的關係Session
- linux引數修改Linux
- 動態引數與靜態引數的判斷、修改
- java形式引數和返回值的深入研究Java
- c#基礎-5.變長引數和引數預設值C#
- 數值型模板引數的應用
- c++函式引數和返回值C++函式
- process和session引數最大值估算方法Session
- C#引數傳遞之值引數C#
- javascript如何修改url地址的引數JavaScript
- Solaris下修改UDP引數的方法UDP
- Oracle引數修改後的生效判定Oracle
- Oracle引數修改小結Oracle
- 07:函式之函式的引數和返回值函式
- ajax傳遞的引數值包含單引號
- js根據引數名獲取url上的引數值JS
- 【C++】引數的預設值C++
- 形似賦值語句的引數賦值