eygle.com   eygle.com
eygle.com eygle
eygle.com  
 

« 如何有条件的分步删除数据表中的记录 | Blog首页 | 正月十五雪打灯--元宵小聚 »

Redo allocation latch介绍

在Log Buffer中分配内存空间时需要获取Redo allocation latch 。
在Oracle9.2之前,Redo allocation latch 是唯一的,因此向Log Buffer Cache中写入redo entries时是串行的。
在Oracle9.2企业版中,Redo allocation latch 的数量由LOG_PARALLELISM控制。
我们可以查询V$LATCH_CHILDREN视图获得Latch信息:
10:02:41 SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
PL/SQL Release 9.2.0.6.0 - Production
CORE    9.2.0.6.0       Production
TNS for 32-bit Windows: Version 9.2.0.6.0 - Production
NLSRTL Version 9.2.0.6.0 - Production

10:02:46 SQL> select name,latch#,child#,gets,misses
10:02:51   2  from v$latch_children where name = 'redo allocation';

NAME                               LATCH#     CHILD#       GETS     MISSES
------------------------------ ---------- ---------- ---------- ----------
redo allocation                       115          1        815          1

Redo allocation latch 在Log Buffer中为每个事务分配空间,如果事务很小或者服务器只有一个CPU,Redo allocation latch 同时COPY事务数据到Log Buffer Cache。在Log Switch释放空间时,Redo allocation latch 和 Redo Copy Latch同时被释放,也即在Log Switch过程中,Redo的生成是被禁止的。
在Oracle10g中,为了减少竞争,Oracle缺省的预分配19个redo allocation Latch:
SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Prod
PL/SQL Release 10.1.0.3.0 - Production
CORE    10.1.0.3.0      Production
TNS for 32-bit Windows: Version 10.1.0.3.0 - Production
NLSRTL Version 10.1.0.3.0 - Production

SQL>
SQL> select name,latch#,child#,gets,misses
  2  from v$latch_children where name = 'redo allocation';

NAME                               LATCH#     CHILD#       GETS     MISSES
------------------------------ ---------- ---------- ---------- ----------
redo allocation                       137          1       1193          1
redo allocation                       137          2        111          0
redo allocation                       137          3        399          0
redo allocation                       137          4          7          0
redo allocation                       137          5          4          0
redo allocation                       137          6          4          0
redo allocation                       137          7          4          0
redo allocation                       137          8          4          0
redo allocation                       137          9          4          0
redo allocation                       137         10          4          0
redo allocation                       137         11          4          0

NAME                               LATCH#     CHILD#       GETS     MISSES
------------------------------ ---------- ---------- ---------- ----------
redo allocation                       137         12          4          0
redo allocation                       137         13          4          0
redo allocation                       137         14          4          0
redo allocation                       137         15          4          0
redo allocation                       137         16          4          0
redo allocation                       137         17          4          0
redo allocation                       137         18          4          0
redo allocation                       137         19          4          0

19 rows selected.

参考: Metalink Note:147471.1
历史上的今天...
    >> 2011-02-23文章:
    >> 2010-02-23文章:
    >> 2009-02-23文章:
    >> 2008-02-23文章:
    >> 2006-02-23文章:

无觅

By eygle on 2005-02-23 09:22 | Comments (0) | | 187 |


CopyRight © 2004~2020 云和恩墨,成就未来!, All rights reserved.
数据恢复·紧急救援·性能优化 云和恩墨 24x7 热线电话:400-600-8755 业务咨询:010-59007017-7040 or 7037 业务合作: marketing@enmotech.com