一区二区三区在线-一区二区三区亚洲视频-一区二区三区亚洲-一区二区三区午夜-一区二区三区四区在线视频-一区二区三区四区在线免费观看

服務器之家:專注于服務器技術及軟件下載分享
分類導航

Mysql|Sql Server|Oracle|Redis|MongoDB|PostgreSQL|Sqlite|DB2|mariadb|Access|數據庫技術|

服務器之家 - 數據庫 - Oracle - Oracle中檢查是否需要重構索引的sql

Oracle中檢查是否需要重構索引的sql

2019-11-29 17:43Oracle教程網 Oracle

經常需要在Oracle中檢查是否需要重構索引,在此寫了個示例語句,有此需求的朋友可以參考下,希望對大家有所幫助

代碼如下:


SELECT 
height, /*Height of the B-Tree*/ 
blocks, /* Blocks in the index segment */ 
name, /*index name */ 
lf_rows, /* number of leaf rows in the index */ 
lf_blks, /* number of leaf blocks in the index */ 
del_lf_rows, /* number of deleted leaf rows in the index */ 
rows_per_key /* average number of rows per distinct key */ 
blk_gets_per_access /* consistent mode block reads (gets) */ 
FROM INDEX_STATS 
WHERE NAME='INDEX_NAME'; 

 

復制代碼代碼如下:


ANALYZE index INDEX_NAME VALIDATE STRUCTURE 



HEIGHT: 
This column refers to the height of the B-tree index, and it's usually at the 1, 2, or 3 level. 
If large inserts push the index height beyond a level of 4, it's time to rebuild, which flattens the B-tree. 

DEL_LF_ROWS: 
This is the number of leaf nodes deleted due to the deletion of rows. 
Oracle doesn't rebuild indexes automatically and, consequently, too many deleted leaf rows can lead to an unbalanced B-tree. 

BLK_GETS_PER_ACCESS: 
You can look at the BLK_GETS_PER_ACCESS column to see how much logical I/O it takes to retrieve data from the index. If this row shows a double-digit number, you should probably start rebuilding the index.

延伸 · 閱讀

精彩推薦
主站蜘蛛池模板: 青青网站 | 男人含玉势出嫁束器 | 国产精品日韩在线观看 | 亚洲人成高清毛片 | 秋霞717理论片在线观看 | 俺去啦最新官网 | 国产欧美一区二区精品久久久 | 特级淫片大乳女子高清视频 | 偷偷狠狠的日日高清完整视频 | 国产极品精频在线观看 | 调教女高中生第3部分 | 成人150p | 亚洲色图二区 | 午夜理论片YY4399影院 | 国产91青青成人a在线 | 免费369看片入口 | 柔术一级毛片 | 欧美xxxxxbb | 亚洲码和乱人伦中文一区 | 免费观看欧美成人h | 天天综合天天综合色在线 | 88av免费观看 | 狠狠色婷婷日日综合五月 | 亚洲爱v | 无人区免费一二三四乱码 | 欧美精品一区视频 | 九九免费精品视频 | 久久99影院 | 小早川怜子亚洲综合中文字幕 | 精品推荐国产麻豆剧传媒 | 深夜在线网站 | 日韩 欧美 国产 亚洲 中文 | 99久久精品国产免费 | jizz中国jizz老师水多 | jm漫天堂破解版 | 特级毛片全部免费播放器 | 亚洲AV 无码AV 中文字幕 | 国产视频二| 啊啊啊好爽在线观看 | 亚洲视频在线观看免费视频 | 日本无遮挡吸乳视频看看 |