ITPub博客

首页 > 数据库 > Oracle > enq: TX - index contention

enq: TX - index contention

原创 Oracle 作者:monkeybron 时间:2015-04-02 10:23:27 0 删除 编辑
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

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30182853/viewspace-1482661/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: explain-join-methods
请登录后发表评论 登录
全部评论

注册时间:2015-03-30

  • 博文量
    70
  • 访问量
    94590