[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.主要操作
4.重要的数据字典
[color=red]Hints:
如果当v$index_stat的记录中的lef_row和def_lef_row的比例大于15%的时候,就需要考虑rebuild的这个索引[/color]
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]