您的位置:首页 > 其它

计算索引碎片的一个脚本

2011-12-06 12:35 281 查看
今天在网上看到了一个估计索引碎片的方法,所以写了个小过程,对用户下的所有索引进行一次计算,挑选二元高度大于4的或者碎片率大于10%的索引进行输出。 需要说明的是,这种估计索引碎片的方法来自网上,还没有查询官方文档上的相关部分,仅供参考,我不对分析出的结果负责。

我在一些OCP的教材上看到了有关analyze validate的说明,据称可以分析出碎片数,但是现在还没在官方文档上找到确切的证据,希望知道的人给我讲一下,以下是我从官方文档上找到的一些关于analyze validate的说明:

For an index, Oracle Database verifies the integrity of each data block in the index and checks for block corruption. This clause does not confirm that each row in the table has an index entry or that each index entry points to a row in the table. You can perform these operations by validating the structure of the table with the CASCADE clause.

Oracle 验证每一个索引的数据块完整性以及检查block corruption。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: