Quantcast
Channel: 回归江南旧梦
Viewing all articles
Browse latest Browse all 65

Init parameter 11g explain

$
0
0
 
*********************************************
open_cursors
*********************************************
推荐范围:500--2000
 
每个session最多能同时打开多少个cursor;session_cached_cursor设
OPEN_CURSORS specifies the maximum number of open cursors (handles to private SQL areas) a session can have at once. You can use this parameter to prevent a session from opening an excessive number of cursors.
 
执行sql语句的时候,我们将会在shared pool产生一个library cache object,cursor就是其中针对于sql语句的一种library cache object.另外我们会在pga有一个cursor的拷贝,同时在客户端会有一个statement handle,这些都被称为cursor,在v$open_cursor里面我们可以看到当前打开的cursor和pga内cached cursor.
 
 
 
 
 

 
*********************************************
session_cached_cursor
*********************************************
 
推荐范围:50--200
 
定每个session最多可以缓存多少个关闭掉的cursor。
该参数限制了在pga内session cursor cache list的长度,session cursor cache list是一条双向的lru链表,当session打算关闭一个cursor时,如果这个cursor的parse count >=3次,那么这个cursor将会被加到session cursor cache list的MRU端.当session打算parse一个sql时,它会先去pga内搜索session cursor cache list,如果找到那么会把这个cursor脱离list,然后当关闭的时候又重复之前的循环,session_cached_cursor提供了快速软分析的功能,提供了比soft parse更高的性能。
 
 

 

Viewing all articles
Browse latest Browse all 65

Trending Articles