Oracle什麼情況下需要rebuild index
主要還是看index的扁平程度,
Rebuild the index when :
- deleted entries represent 20% or more of the current entries
- the index depth is more then 4 levels.
Possible candidate for bitmap index :
- when distinctiveness is more than 99%
然後可以用中的指令碼,也可以如下:
條件1
Rebuild the index when :
- deleted entries represent 20% or more of the current entries
- the index depth is more then 4 levels.
Possible candidate for bitmap index :
- when distinctiveness is more than 99%
然後可以用中的指令碼,也可以如下:
條件1
在分析(analyze)指定索引之後,查詢index_stats的height欄位的值,如果這個值>=4 ,則最好重建(rebuild)這個索引。雖然這個規則不是總是正確,但如果這個值一直都是不變的,則這個索引也就不需重建。
條件2
在分析(analyze)指定索引之後,查詢index_stats的del_lf_rows和lf_rows的值,如果(del_lf_rows/lf_rows)*100 > = 20,則這個索引也需要重建。
例子:
SQL > analyze index IND_PK validate structure;
SQL > select name,height,del_lf_rows,lf_rows,(del_lf_rows/lf_rows) *100 from index_stats;
NAME HEIGHT DEL_LF_ROWS LF_ROWS (DEL_LF_ROWS/LF_ROWS)*100
------------------------------ ---------- ----------- ---------- -------------------------
INDX_PK 4 277353 990206 28.0096263
SQL> alter index IND_PK rebuild;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/628922/viewspace-740375/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 在什麼情況下用index unique scansIndex
- Oracle軟體安裝 - 什麼情況下需要relink allOracle
- 什麼情況下需要搭建大資料平臺大資料
- 香港伺服器什麼情況下需要更新升級?伺服器
- 爬蟲在什麼情況下才需要使用代理IP爬蟲
- vue什麼情況下需要用到this.$nextTickVue
- 資料庫分割槽表 什麼情況下需要分割槽資料庫
- ORACLE中index的rebuildOracleIndexRebuild
- 【知識分享】企業在什麼情況下需要做負載均衡負載
- 為什麼使用API?什麼情況下避免使用API?API
- Oracle alter index rebuild 說明OracleIndexRebuild
- 聊聊索引Index Rebuild和Rebuild Online(下)索引IndexRebuild
- oracle分表效率,資料庫分庫分表是什麼,什麼情況下需要用分庫分表Oracle資料庫
- CPU超頻小知識:電腦CPU什麼情況下需要超頻?
- oracle組合索引什麼情況下生效?Oracle索引
- rebuild indexRebuildIndex
- index rebuildIndexRebuild
- Java類什麼情況下被初始化?Java
- 在什麼情況下Java比C++快?JavaC++
- Oracle -- left join 什麼情況可以直接改成joinOracle
- rebuild index 排序RebuildIndex排序
- sybase rebuild indexRebuildIndex
- js中什麼情況下返回值是undefinedJSUndefined
- 在什麼情況下,Java比C++慢很多?JavaC++
- oracle 為什麼沒有使用索引的一種情況Oracle索引
- 基於COST優化,oracle什麼情況不走索引優化Oracle索引
- Oracle效能優化之“少做事”(rebuild index)Oracle優化RebuildIndex
- 什麼情況!華為開源JDK!JDK
- Index rebuild --case 1IndexRebuild
- alter index rebuild 與 rebuild onlineIndexRebuild
- 什麼情況下需要建立索引? 索引的作用?為什麼能夠提高查詢速度?(索引的原理) 索引有什麼副作用嗎?索引
- alter index rebuild與index_statsIndexRebuild
- Linux中什麼情況下會發生程式排程?Linux
- 企業在什麼情況下引入分散式資料庫?分散式資料庫
- Snowflake(雪花演算法),什麼情況下會衝突?演算法
- MySQL什麼情況下刪除資料會釋放空間MySql
- 探究哪些情況下企業需要部署CRM系統?
- Index Online RebuildIndexRebuild