- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
5#
发表于 2012-4-23 19:43:45
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
SQL> alter session set events '30009 trace name errorstack level 4';
Session altered.
SQL> alter session set workarea_size_policy=MANUAL;
Session altered.
SQL> CREATE TABLE t AS SELECT rownum AS n, lpad('*',1000,'*') AS pad FROM dual CONNECT BY level <= 100000;
CREATE TABLE t AS SELECT rownum AS n, lpad('*',1000,'*') AS pad FROM dual CONNECT BY level <= 100000
*
ERROR at line 1:
ORA-30009: Not enough memory for CONNECT BY operation
SQL> oradebug setmypid;
Statement processed.
SQL> oradebug tracefile_name
/s01/orabase/diag/rdbms/g11r23/G11R23/trace/G11R23_ora_24919.trc
dbkedDefDump(): Starting a non-incident diagnostic dump (flags=0x0, level=4, mask=0x0)
----- Error Stack Dump -----
ORA-30009: Not enough memory for CONNECT BY operation
----- Current SQL Statement for this session (sql_id=263cyr72uw1q4) -----
CREATE TABLE t AS SELECT rownum AS n, lpad('*',1000,'*') AS pad FROM dual CONNECT BY level <= 100000
----- Call Stack Trace -----
calling call entry argument values in hex
location type point (? means dubious value)
-------------------- -------- -------------------- ----------------------------
skdstdst()+36 call kgdsdst() 000000000 ? 000000000 ?
7FFFA9EF7C98 ? 000000001 ?
000000001 ? 000000002 ?
ksedst1()+98 call skdstdst() 000000000 ? 000000000 ?
7FFFA9EF7C98 ? 000000001 ?
000000000 ? 000000002 ?
ksedst()+34 call ksedst1() 000000000 ? 000000001 ?
7FFFA9EF7C98 ? 000000001 ?
000000000 ? 000000002 ?
dbkedDefDump()+2741 call ksedst() 000000000 ? 000000001 ?
7FFFA9EF7C98 ? 000000001 ?
000000000 ? 000000002 ?
ksedmp()+36 call dbkedDefDump() 000000004 ? 000000000 ?
7FFFA9EF7C98 ? 000000001 ?
000000000 ? 000000002 ?
000000000 ? 000000002 ?
dbkdaKsdActDriver() call ksedmp() 000000004 ? 000000000 ?
+1960 7FFFA9EF7C98 ? 000000001 ?
000000000 ? 000000002 ?
dbgdaExecuteAction( call dbkdaKsdActDriver() 2B3F6A7CC710 ? 7FFFA9EFE920 ?
)+1065 7FFFA9EF7C98 ? 000000001 ?
000000000 ? 000000002 ?
dbgdaRunAction()+81 call dbgdaExecuteAction( 2B3F6A7CC710 ? 00A0A8360 ?
0 ) 0020C0003 ? 7FFFA9EFE920 ?
000000001 ? 000000002 ?
dbgdRunActions()+59 call dbgdaRunAction() 2B3F6A7CC710 ? 000000005 ?
0020C0003 ? 7FFFA9EFE920 ?
000000001 ? 000000002 ?
dbgdProcessEventAct call dbgdRunActions() 2B3F6A7CC710 ? 000000005 ?
ions()+651 0020C0003 ? 7FFFA9EFE920 ?
000000001 ? 000000002 ?
dbgdChkEventKgErr() call dbgdProcessEventAct 2B3F6A7CC710 ? 00BAF3FA0 ?
+1653 ions() 2B3F6AD357D0 ? 7FFFA9EFE920 ?
000000001 ? 000000002 ?
dbkdChkEventRdbmsEr call dbgdChkEventKgErr() 2B3F6A7CC710 ? 00BAF3FA0 ?
r()+56 7FFFA9EF44D0 ? 7FFFA9EFE920 ?
000000001 ? 000000002 ?
ksfpec()+61 call dbkdChkEventRdbmsEr 7FFFA9EF44D0 ? 00BAF3FA0 ?
r() 7FFFA9EF44D0 ? 7FFFA9EFE920 ?
000000001 ? 000000002 ?
dbgePostErrorKGE()+ call ksfpec() 7FFFA9EF44D0 ? 7FFFA9EF44D0 ?
1129 7FFFA9EF44D0 ? 7FFFA9EFE920 ?
000000001 ? 000000002 ?
dbkePostKGE_kgsf()+ call dbgePostErrorKGE() 00BAF3FA0 ? 2B3F6AD00040 ?
kgesev()+280 call dbkePostKGE_kgsf() 00BAF3FA0 ? 2B3F6AD00040 ?
000007539 ? 000000000 ?
100000000 ? 000000002 ?
ksesec1()+165 call kgesev() 00BAF3FA0 ? 2B3F6AD00040 ?
000007539 ? 000000001 ?
7FFFA9EFF6B0 ? 000000002 ?
qercbiPushState()+5 call ksesec1() 00BAF3FA0 ? 000000001 ?
18 00000000A ? 009B49418 ?
2B3F6AD336BC ? 2B3F6AD336C0 ?
qercbiFetch()+273 call qercbiPushState() 089369CA0 ? 2B3F6AD330D0 ?
00000000A ? 009B49418 ?
2B3F6AD336BC ? 2B3F6AD336C0 ?
qercoFetch()+205 call qercbiFetch() 089369CA0 ? 2B3F6AD330D0 ?
0024CB996 ? 7FFFA9EFF9D0 ?
2B3F00007FFF ? 2B3F6AD336C0 ?
rwsfcd()+103 call qercoFetch() 089369940 ? 2B3F6AD33418 ?
0024CB996 ? 7FFFA9EFF9D0 ?
2B3F00007FFF ? 2B3F6AD336C0 ?
qerltFetch()+599 call rwsfcd() 089369848 ? 2B3F6AD33478 ?
0024D0378 ? 7FFFA9EFF9D0 ?
2B3F00007FFF ? 2B3F6AD336C0 ?
ctcdrv()+13581 call qerltFetch() 0893695E8 ? 2B3F6AD33600 ?
001335A12 ? 7FFFA9F00970 ?
2B3F00000001 ? 2B3F6AD336A0 ?
stack call ctcdrv=>qerltFetch=>rwsfcd=>qercoFetch=>qercbiFetch=>qercbiPushState=> 30009 raised
Dumping Work Area Table (level=1)
=====================================
Global SGA Info
---------------
global target: 312 MB
auto target: 242 MB
max pga: 200 MB
pga limit: 0 MB
pga limit known: 0
pga limit errors: 0
pga inuse: 42 MB
pga alloc: 64 MB
pga freeable: 15 MB
pga freed: 500 MB
pga to free: 0 %
broker request: 0
pga auto: 0 MB
pga manual: 0 MB
pga alloc (max): 149 MB
pga auto (max): 8 MB
pga manual (max): 0 MB
# workareas : 2
# workareas(max): 9
Plan Table
============
--------------------------------------------------+-----------------------------------+
| Id | Operation | Name | Rows | Bytes | Cost | Time |
--------------------------------------------------+-----------------------------------+
| 0 | CREATE TABLE STATEMENT | | | | 3 | |
| 1 | LOAD AS SELECT | | | | | |
| 2 | COUNT | | | | | |
| 3 | CONNECT BY WITHOUT FILTERING | | | | | |
| 4 | FAST DUAL | | 1 | | 2 | 00:00:01 |
--------------------------------------------------+-----------------------------------+
DYNAMICALLY MODIFIED PARAMETERS:
workarea_size_policy = MANUAL
_smm_auto_cost_enabled = FALSE
CONNECT BY Clause 会消耗一定量的PGA 内存
connect by 操作时
pga inuse: 42 MB
pga alloc: 64 MB
没有connect by 时
SQL> set linesize 200 pagesize 1400
SQL> select name,value/1024/1024 from v$pgastat where name in ('total PGA inuse','total PGA allocated');
NAME VALUE/1024/1024
---------------------------------------------------------------- ---------------
total PGA inuse 36.78125
total PGA allocated 56.3720703 |
|