[20130104]oracle能有多少子游標.txt
[20121019]oracle能有多少子游標.txt
原連結:
http://www.antognini.ch/2012/10/how-many-children-can-a-parent-cursor-have-1000000/
看看oracle可能有多少子游標,也就是最大是多少?重複原作者的測試看看。
我的測試環境:
--從top看CPU很忙。
Tasks: 123 total, 2 running, 121 sleeping, 0 stopped, 0 zombie
Cpu(s): 25.0% us, 0.2% sy, 0.0% ni, 74.7% id, 0.2% wa, 0.0% hi, 0.0% si
Mem: 4045276k total, 3892552k used, 152724k free, 118700k buffers
Swap: 3911788k total, 1428k used, 3910360k free, 3149860k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
8957 oracle11 25 0 1755m 119m 116m R 99.9 3.0 4:25.10 oracle
--檢視等待事件.
--最大就是這個,估計我共享池設定太小,無法達到作者的測試要求。
SQL> show sga
Total System Global Area 1603411968 bytes
Fixed Size 2213776 bytes
Variable Size 1174407280 bytes
Database Buffers 419430400 bytes
Redo Buffers 7360512 bytes
摘抄一段:
http://www.antognini.ch/2012/10/how-many-children-can-a-parent-cursor-have-1000000/
The most interesting part is the one providing the number of child cursors: 65536.
I might be wrong but to me that means that the child number is stored as an unsigned integer taking 16 bits. And, when the maximum is exceeded, an ORA-00600 is raised.
According to this test the maximum number of child cursors for a given parent cursor is 65536. But, as already written,the fix for bug# 10187168 artificially limits it to 100.
原連結:
http://www.antognini.ch/2012/10/how-many-children-can-a-parent-cursor-have-1000000/
看看oracle可能有多少子游標,也就是最大是多少?重複原作者的測試看看。
我的測試環境:
SQL> select * from v$version where rownum<=1;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
CREATE TABLE t (n NUMBER);
INSERT INTO t VALUES (1);
COMMIT;
execute dbms_stats.gather_table_stats(user,'t')
1.測試
DECLARE
l_count PLS_INTEGER;
BEGIN
FOR i IN 1..100
LOOP
EXECUTE IMMEDIATE 'ALTER SESSION SET optimizer_index_caching = '||i;
FOR j IN 1..10000
LOOP
EXECUTE IMMEDIATE 'ALTER SESSION SET optimizer_index_cost_adj = '||j;
EXECUTE IMMEDIATE 'SELECT count(*) FROM t' into l_count;
END LOOP;
END LOOP;
END;/
--從top看CPU很忙。
Tasks: 123 total, 2 running, 121 sleeping, 0 stopped, 0 zombie
Cpu(s): 25.0% us, 0.2% sy, 0.0% ni, 74.7% id, 0.2% wa, 0.0% hi, 0.0% si
Mem: 4045276k total, 3892552k used, 152724k free, 118700k buffers
Swap: 3911788k total, 1428k used, 3910360k free, 3149860k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
8957 oracle11 25 0 1755m 119m 116m R 99.9 3.0 4:25.10 oracle
--檢視等待事件.
SQL> select sid,event from v$session_wait where sid=191
SID EVENT
---------- ------------------------
191 library cache: mutex X
1 row selected.
SQL> select count(*) from v$sql where sql_id='5tjqf7sx5dzmj';
COUNT(*)
----------
2349
--最大就是這個,估計我共享池設定太小,無法達到作者的測試要求。
SQL> show sga
Total System Global Area 1603411968 bytes
Fixed Size 2213776 bytes
Variable Size 1174407280 bytes
Database Buffers 419430400 bytes
Redo Buffers 7360512 bytes
摘抄一段:
http://www.antognini.ch/2012/10/how-many-children-can-a-parent-cursor-have-1000000/
The most interesting part is the one providing the number of child cursors: 65536.
I might be wrong but to me that means that the child number is stored as an unsigned integer taking 16 bits. And, when the maximum is exceeded, an ORA-00600 is raised.
According to this test the maximum number of child cursors for a given parent cursor is 65536. But, as already written,the fix for bug# 10187168 artificially limits it to 100.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-752085/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 一個sql最多可擁有多少子游標SQL
- Oracle - 共享遊標、父子游標、硬軟解析Oracle
- Oracle遊標共享,父遊標和子游標的概念Oracle
- input 獲取游標位置與設定游標位置
- oracle實驗記錄 (子游標與解析)Oracle
- [20160205]大量子游標引起的等待事件.txt事件
- [20130104]快速移動資料檔案.txt
- 在Oracle sqlplus下靈活使用游標OracleSQL
- [20160215]超長sql語句與父子游標.txtSQL
- 游標操作快捷鍵
- 子游標過多導致大量mutex爭用故障分析Mutex
- winform之手繪矩形及游標字串與游標關聯顯示ORM字串
- oracle 11g適應性子游標 改善PEEKINGOracle
- (12)mysql 中的游標MySql
- 阻止游標預設事件事件
- secureCRT游標不見啦Securecrt
- css 滑鼠游標設定CSS
- [20220328]查詢游標為什麼不共享指令碼.txt指令碼
- win10游標怎麼縮放_win10游標縮放方法Win10
- [20180822]session_cached_cursors與子游標堆0.txtSession
- 【CSS: cursor】滑鼠游標指標樣式大全CSS指標
- 設定/獲得游標位置
- cad游標大小怎麼調 cad游標中心正方形大小設定
- win10如何換滑鼠游標 win10更換滑鼠游標怎麼操作Win10
- PLSQL Language Referenc-PL/SQL靜態SQL-游標變數-建立游標變數SQL變數
- [20200129]子游標不共享BIND_EQUIV_FAILURE.txtUIAI
- [20220420]完善查詢游標為什麼不共享指令碼.txt指令碼
- [20121016]字串長度與繫結變數的子游標.txt字串變數
- win10 更改游標顏色方法 win10 滑鼠游標顏色怎麼改Win10
- PLSQL Language Referenc-PL/SQL靜態SQL-游標變數-游標變數賦值SQL變數賦值
- Web 中的“選區”和“游標”Web
- UITextField 游標位置,placeholder樣式UI
- (012)mysql中的游標MySql
- 【Swing】JTextField設定游標
- [20221101]如何減少BIND_EQUIV_FAILURE引起的子游標.txtUIAI
- PLSQL Language Referenc-PL/SQL靜態SQL-靜態SQL的描述-游標-顯式游標SQL
- 如何更改 Mac 上的游標顏色Mac
- CSS 設定文字框游標顏色CSS