Oracle
发布时间:2022-05-17 发布网站:大佬教程 code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Oracle索引-新建 维护 监督使用等,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
1、查询用户的索引 sql>
SELEct
index_name,table_name,
tablespace_name,
index_type,unique
ness,
status froR_815_11845@ dba_indexes where
owner='SCott'; 2、新建索引 sql> create index scott.emp_
ename_IDex on scott.emp(job) 2 pctfree 20 3 storage(initial 100K next 100K pc
Tincrease 0 max
extents 100) 4 tablespace lianx
i_index; Index created sql>
SELEct
index_name,
status froR_815_11845@ dba_indexes 2 where
owner='SCott';
index_name table_name
tablespace_name index_type UNIQUE
nesS STATUS ------------------------------ ------------------------------ ------------------------------ --------------------------- ---------- -------- PK_
DEPT dEPT USERS norMAL UNIQUE VALID PK_EMP EMP USERS norMAL UNIQUE VALID EMP_
ename_IDEX EMP liANX
i_iNDEX norMAL NONUNIQUE VALID 3、修改索引 sql> alter index scott.EMP_
ename_IDEX rebuild pctfree 25 storage(next 250K
); Index altered 4、修改索引所在的区段 sql> alter index scott.EMP_
ename_IDEX allocate extent; Index altered 5、联机创建索引 alter index scott.scott.EMP_
ename_IDEX rebuild online; 6、回收木有用的空间 alterindex scott.scott.EMP_
ename_IDEX deallocate unused; 7、合并碎片 alterindex scott.scott.EMP_
ename_IDEX coalesce; ================================索引使用情况进行监督======================================================================== 1、开启监督语句 sql> alter index scott.EMP_
ename_IDEX monitoring usage; Index altered 2、查看使用情况 sql>
SELEct * from
v$ob
ject_usage;
index_name table_name MONITORING USED START_MONITORING END_MONITORING ------------------------------ ------------------------------ ---------- ---- ------------------- ------------------- 3、关闭监督语句 sql> alter index scott.EMP_
ename_IDEX nomonitoring usage; Index altered
大佬总结
以上是大佬教程为你收集整理的Oracle索引-新建 维护 监督使用等全部内容,希望文章能够帮你解决Oracle索引-新建 维护 监督使用等所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。