Oracle中临时表产生过量Redo的说明

文章作者 100test 发表时间 2007:03:14 13:45:04
来源 100Test.Com百考试题网


最近,在Oracle9i中你用过临时表吗?

它是否给你带来了性能提高?你注意过么?

--------------------------------------------------------------------------------

好了言归正传.

我们知道临时表在DML操作中可以减少redo的生成,从而在保存中间结果集时可以带来较大的性能提高.

可是,如果你注意到了,在Oracle9i里,临时表可能比常规表还要产生更多的redo:

[oracle@jumper oracle]$ sqlplus eygle/eygle
SQL*Plus: Release 9.2.0.3.0 - Production on Sat Jul 3 16:37:01 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.3.0 - Production ----请注意版本
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.3.0 - Production
SQL> create table ccc1 (c1 number).
Table created.
SQL> set autotrace trace stat
SQL> insert into ccc1 0select rownum from dba_objects.
10468 rows created.
Statistics
----------------------------------------------------------
73 recursive calls
175 db block gets
25623 consistent gets
36 physical reads
157336 redo size --------------------常规表产生的redo,大约154K
622 bytes sent via SQL*Net to client
547 bytes received via SQL*Net from client
3 SQL*Net roundtrips to/from client
2 sorts (memory)
0 sorts (disk)
10468 rows processed
SQL> create global temporary table ccc2 (c1 number) .
Table created.
SQL> set autotrace trace stat
SQL> insert into ccc2 0select rownum from dba_objects.
10468 rows created.
Statistics
----------------------------------------------------------
135 recursive calls
10897 db block gets
25653 consistent gets
115 physical reads
1476012 redo size ---------------------这是临时表,产生了大约1.4M的redo
622 bytes sent via SQL*Net to client
547 bytes received via SQL*Net from client
3 SQL*Net roundtrips to/from client
2 sorts (memory)
0 sorts (disk)
10468 rows processed


相关文章


Oracle认证的专家之见
OracleVC认证,浪潮谱写高端挑战新篇章
Oracle中Killsession的研究
指导之oracle里面使用临时表解决表冲突一例
Oracle中临时表产生过量Redo的说明
2006年度动态Oracle认证大师的魔力
06年考试指导之Oracle与SQLServer的互连
2006年全球获得Oracle认证人数最新统计
考试技术学习总结:Oracle的软件结构
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛