Index Management

[b]1.classification of indexex[/b]
a>:logical
1>:single column and concatenated
2>:unique and nounique
3>:function based
4>:domain
b>:phisical
1>:partitioned and nopartitioned
2>:b-tree
3>:bitmap(normal and reverse key)
2.guidelines
a>:平衡查询和数据库的DML的需要
b>: 把索引和表建立到不同的表空间里
c>:使用统一大小的extents(block块的5倍或者使用tablespace.minnum_extent大小)
d>:创建索引使用nologging的方式
e>:index 的intitrans应该比table的initrans大
3.主要操作

---------新增加空间给index
alter index indexname allocate extent (size 100k datafile '');
---------释放空间
alter index indexname deallocate unused;
--------重新创建索引
alter index indexname rebuild tablespace tabs;
--------索引的融合
alter index indexname coalesce;
----------检查索引的有效性,最总将结果存储在v$index_stat
analyze table indexname validate structure;
--------监控索引(v$object_usage)
alter index indexname monitoring usage;
alter index indexname nomonitoring usage;

4.重要的数据字典
select * from v$index_stat;
select * from dba_ind_columns
select * from v$object_usage


[color=red]Hints:
如果当v$index_stat的记录中的lef_row和def_lef_row的比例大于15%的时候,就需要考虑rebuild的这个索引[/color]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值