2020年12月23日 星期三

何時重建索引 When to Rebuild Indexes

 

http://www.dba-oracle.com/t_oracle_analyze_index.htm

Oracle ANALYZE INDEX

Oracle Database Tips by Donald Burleson



http://www.remote-dba.net/t_tuning_index_rebuilding.htm

Index Rebuilding Techniques

Oracle Tips by Burleson Consulting



何時重建索引

如果每次訪問獲取的塊過多,則我們可能要重建索引,因為過多的塊獲取表示碎片化的B樹結構。另一個重建條件是刪除的葉子節點佔索引節點的20%以上的情況。重建的另一個原因是當任何索引顯示的深度為4或更大時。


When to Rebuild Indexes

Rebuild an Oracle index with the following command:

ALTER INDEX index_name REBUILD TABLESPACE tablespace_name;

We might want to rebuild an index if the block gets per access is excessive, since excessive block gets indicate a fragmented B-tree structure. Another rebuild condition would be cases where deleted leaf nodes comprise more than 20 percent of the index nodes. Another reason to rebuild is when any index shows a depth of 4 or greater.



使用alter index rebuild進行索引重建是非常安全的命令。如果出現任何問題,Oracle會中止該操作並將現有索引保留在原處。

Index rebuilding with the alter index rebuild is a very safe command. If anything goes wrong, Oracle aborts the operation and leaves the existing index in place.







沒有留言:

張貼留言