oracle维护disable的索引吗,Oracle维护索引、表

Oracle维护索引

1.重建索引

alter index index_name1 rebuild;

2.重建索引并转移到别的表空间

alter index index_name1 rebuild tablespace other_tablespace;  --这个表空间要首先创建

3.修改索引的一些参数设置

alter index index_name rebuild pctfree 30 storage(next 100k);

4.自动为索引分配空间

alter index index_name allocate extent;

5.整合索引碎片

alter index index_name coalesce;

6.删除一个索引

drop index index_name;

7.开启对索引的监控,然后分析索引

--首先开启对索引的监控

alter index index_name  monitoring usage;

--然后执行一个与索引有关的查询

--接着关闭对索引的监控

alter index index_name  nomonitoring usage;

--然后查询v$object_usage视图

select index_name,start_monitoring,end_monitoring

from  v$object_usage

where index_name = '........'

修改分区表的pctfree:

alter TABLE ORDER_PAR   pctfree 30;

SELECT a.table_name,a.partition_name,ini_trans,a.pct_free,a.ini_trans FROM user_tab_partitions a where table_name = 'ORDER_PAR';

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值