Oracle 11.2.0.1 Result Cache 測試 - 2 引數

tolywang發表於2015-02-11
一,資料庫初始化引數:  
SQL> show  parameter  result  
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
client_result_cache_lag              big integer 3000
client_result_cache_size             big integer 0
result_cache_max_result              integer     5
result_cache_max_size                big integer 62944K
result_cache_mode                    string      MANUAL
result_cache_remote_expiration       integer     0
SQL>  

1. Server端Result Cache引數:   
result_cache_max_result              integer     5
result_cache_max_size                big integer 62944K
result_cache_mode                    string      MANUAL
result_cache_remote_expiration       integer     0

RESULT_CACHE_MODE
該參數列示是否需要採用Result Cache技術,取值如下:
MANUAL:表示當在語句中增加相關HINT(RESULT_CACHE)時,才使用Result Cache技術。該值為預設值。
FORCE: 表示只要有可能,所有查詢語句都將使用Result Cache技術, 一般不會這麼設定 。
無論該引數如何設定,Oracle將優先考慮RESULT_CACHE和NO_RESULT_CACHE的 hint。

RESULT_CACHE_MAX_SIZE  
該引數設定Result Cache的最大容量。如果設定為0,則將關閉Result Cache功能。該引數的預設值,依賴
於記憶體管理模式和相關引數配置。例如:
當只設定memory_target引數時,RESULT_CACHE_MAX_SIZE = memory_target*0.25%。
當設定sga_target引數時,RESULT_CACHE_MAX_SIZE = sga_target*0.5%。
當設定shared_pool_size引數時,RESULT_CACHE_MAX_SIZE = shared_pool_size*1%。
該引數最大不能超過shared_pool_size的75%。

RESULT_CACHE_MAX_RESULT 
該引數為單個SQL查詢語句設定可使用的最大Result Cache容量,預設為RESULT_CACHE_MAX_SIZE的5%。

RESULT_CACHE_REMOTE_EXPIRATION
該參數列示當SQL語句訪問遠端資料庫物件時,允許遠端物件資料發生變化的過期時間。預設值為0,表示
一旦遠端物件資料發生變化,相關查詢的Result Cache資料變為INVALID。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-1433505/,如需轉載,請註明出處,否則將追究法律責任。

相關文章