ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Identify index fragmentation

Identify index fragmentation

原创 Linux操作系统 作者:mzc_uk 时间:2011-10-03 15:55:00 0 删除 编辑

analyze index index_name validate structure;

 

select name, trunc(100*(del_lf_rows/lf_rows)) pct_deleted, pct_used from index_stats;

 

An index should be considered for rebuilding under any of the following conditions:

* The percentage of deleted rows exceeds 30% of the total, i.e. if del_lf_rows / lf_rows > 0.3.

* If the ‘HEIGHT’ is greater than 4.

* If the number of rows in the index (‘LF_ROWS’) is significantly smaller than ‘LF_BLKS’ this can indicate a large number of deletes, indicating that the index should be rebuilt.

 

alter index MATRIX.LXSET_CCE31898_LXSET_INDEX rebuild tablespace ESERVICEPROD_INDEX nologging;

 

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

请登录后发表评论 登录
全部评论

注册时间:2011-10-03

  • 博文量
    14
  • 访问量
    10151