日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

oracle怎樣查詢索引的使用情況

系統 2448 0

查詢用戶的索引
select index_name,table_name,tablespace_name,
index_type,uniqueness , status
from dba_indexes where owner='SCOTT';
查詢用戶的索引列
select index_name,table_name,column_name,
index_owner,table_owner
from dba_ind_columns
where table_owner='SCOTT';
查看索引的各種初始化因子
select index_name,table_name,tablespace_name,
pct_free,pct_increase,initial_extent,
next_extent, status
from dba_indexes where owner='SCOTT';

重建和維護索引

alter index scott.emp_ename_idx rebuild
pctfree 40
storage (next 300k);

查看索引segment
select segment_name,segment_type,tablespace_name,extents
from dba_segments
where owner='SCOTT'
and segment_type='INDEX';

給索引添加相應的extent
alter index scott.emp_ename_idx allocate extent;

回收索引端
alter index scott.emp_ename_idx deallocate unused;
合并索引碎片
alter index scott.emp_ename_idx coalesce;

聯機重建索引:
alter index scott.emp_ename_idx rebuild online;

標識索引的使用情況
1.啟用索引監控
alter index emp_ename_idx monitoring usage;
2.執行相關查詢
select ename,job ,sal from scott.emp
where ename like 'C%';
3.查看索引是否使用
select * from v$object_usage;
4.禁用索引監控
alter index emp_ename_idx nomonitoring usage;

oracle怎樣查詢索引的使用情況


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 安庆市| 江永县| 汉寿县| 抚州市| 绥江县| 抚顺县| 铅山县| 龙川县| 黄梅县| 大丰市| 晋宁县| 郓城县| 鸡西市| 青川县| 青浦区| 万盛区| 沭阳县| 澄迈县| 巴林右旗| 礼泉县| 醴陵市| 迁安市| 永兴县| 吉木乃县| 河津市| 乐安县| 玉环县| 周口市| 江油市| 东丽区| 武乡县| 淮南市| 柳林县| 望谟县| 遵义市| 湘阴县| 岳普湖县| 德昌县| 平潭县| 留坝县| 阿尔山市|