Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2232354
  • 博文数量: 310
  • 博客积分: 6853
  • 博客等级: 准将
  • 技术积分: 2833
  • 用 户 组: 普通用户
  • 注册时间: 2005-08-04 16:41
文章分类

全部博文(310)

文章存档

2013年(17)

2012年(42)

2011年(76)

2010年(71)

2009年(99)

2007年(2)

2006年(1)

2005年(2)

分类: Oracle

2011-07-05 12:14:23

HW enqueue

The HW enqueue is used to serialize the allocation of space beyond the high water mark of a segment.

  • V$SESSION_WAIT.P2/V$LOCK.ID1is the tablespace number.

  • V$SESSION_WAIT.P3/V$LOCK.ID2is the relative dba of segment header of the object for which space is being allocated.

If this is a point of contention for an object, then manual allocation of extents solves the problem.

SQL> select p1, p2, p3 from v$session_wait where event = 'enq: HW - contention';
 
        P1         P2         P3
---------- ---------- ----------
1213661190          7  140003563
1213661190          7  140003563
1213661190          7  140003563
1213661190          7  140003563
1213661190          7  140003563
1213661190          7  140003563
1213661190          7  140003563
 
7 rows selected
 
SQL>
SQL> select dbms_utility.data_block_address_block(140003563),
  2         dbms_utility.data_block_address_file(140003563)
  3    from dual
  4  ;
 
DBMS_UTILITY.DATA_BLOCK_ADDRES DBMS_UTILITY.DATA_BLOCK_ADDRES
------------------------------ ------------------------------
                       1591531                             33
 
SQL> select  name from v$tablespace where ts#=7;
 
NAME
------------------------------
INFORES

通过下面语句找到热点segment

select *
  from dba_extents.segment_name
 where tablespace_name = 'INFORES'
   and FILE_ID = 33
   and 1591531 between block_id and block_id + blocks


阅读(1964) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~