enq: TX - index contention等待事件

enq: TX - index contention常由 大量并发INSERT 造成的 index split 引起。下面截取部分有问题的
awr:
 
 
 
可以看到在awr中 发生过 3412次的 index leaf block split , 15次的branch block split 
 
建议:

1. 定期对 DLog 相关的索引执行 coalesce 操作 而非 rebuild 操作。 rebuild 可能导致索引高度下降,当再有 大量插入后可能会导致索引root node split

2. 分区表的话,考虑使用global hash index ,global hash index可以很大程度上避免索引插入争用。
 
SQL> analyze index business.PK_TINSURED validate structure;

Index analyzed.

SQL> select blocks,lf_blks,del_lf_rows from index_stats;

    BLOCKS    LF_BLKS DEL_LF_ROWS
---------- ---------- -----------
    219608     213822         334

SQL> alter index business.PK_TINSURED coalesce;

Index altered.

Elapsed: 00:01:56.97

SQL> analyze index business.PK_TINSURED validate structure;

Index analyzed.

Elapsed: 00:00:27.93
SQL> select blocks,lf_blks,del_lf_rows from index_stats;

    BLOCKS    LF_BLKS DEL_LF_ROWS
---------- ---------- -----------
    219608     165849           0

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值