Index online operation的過程 zt
在create index online, alter index rebuild online時,oracle是怎麼工作的?
Online Index Operations
Oracle provides the capability to perform online index creation. During an online index create operation, concurrent queries and updates are allowed on the base table. During an online index creation operation, changes are recorded in a temporary journal table. At the end of index creation, the journal is merged into the new index. There are three phases in an online index create operation:
Prepare phase: locks are acquired on the table briefly to create the index structure and place entries in the data dictionary.
Build phase: most work is done in this phase where the index is populated. While the build phase occurs, changes to the table are placed in the journal table. The journal table is automatically created and structured as a B-tree so that multiple operations on the same table data can be easily detected and resolved to the latest change.
Merge phase: rows in the journal table are iterratively merged into the index. Most of the merge operation occurs while the table is still online. As journal rows are merged, they are deleted if they are not locked. During the merge phase, edits to the base table will continue to be tracked in the journal table. If changes to the journal continue to occur before the merge process can complete, Oracle will make additional passes through the journal. If after a few passes, the merge is still not complete, Oracle will lock the table briefly and apply the remainder of the journal. The entire process is transparent to the users and upon completion, the new index is brought online.
Index Rebuild (Move)
Oracle supports online index rebuilding. During an online index rebuild operation, concurrent queries and updates are allowed on the base table. The index rebuild operation requires additional disk space during the build process for the newly created index, but the resulting rebuilt index may be more space efficient. Hence the operation is likely to free up additional disk space.
The algorithm for online index rebuild is similar to that of online index creation, and the same basic phases are executed. During an online index rebuild operation, changes are recorded in a temporary journal table. At the end of index rebuild, the journal is merged into the new rebuilt index.
[@more@]來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/82387/viewspace-1016306/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- alter index ... rebuild online的機制(zt)IndexRebuild
- zt_Index Operation索引操作內部細節Index索引
- (轉)Index Rebuild Online 過程(9i)完整版IndexRebuild
- create index...online操作過程中會申請持有哪些鎖Index
- create index online 與rebuild index onlineIndexRebuild
- create index online 與rebuild index onlineIndexRebuild
- 9I/10G 11G online index的實現過程分析Index
- rebuild index online和create index online及沒有online的區別RebuildIndex
- create index .. onlineIndex
- create index onlineIndex
- Index Online RebuildIndexRebuild
- Create Index ...ONLINEIndex
- create index/create index online區別Index
- index rebuild online的問題IndexRebuild
- zt_oracle indexOracleIndex
- CREATE INDEX ......ONLINE分析Index
- postgresql create index concurrently過程描述SQLIndex
- Creating an Index OnlineIndex
- create index online 和create index 不同及注意點Index
- alter index rebuild online引發的血案IndexRebuild
- [zt]Logical standby同步故障的處理過程
- 【羅玄】從鎖的角度看rebuild index online和rebuild indexRebuildIndex
- alter index rebuild 與 rebuild onlineIndexRebuild
- 用flashback恢復儲存過程(ZT)儲存過程
- 建立index 使用Online導致的問題Index
- rebuild index online的鎖機制淺析RebuildIndex
- alter index rebuild和rebuild online的區別IndexRebuild
- pt-online-schema-change工作過程介紹
- 加快create / rebuild index的3個點(zt)RebuildIndex
- [Q]怎麼樣加密儲存過程 zt加密儲存過程
- TNS-12500解決過程(zt)
- 關於rebuild index online 及drop index後重建問題RebuildIndex
- MySQL online create index實現原理MySqlIndex
- 重建索引index rebuild online vs offline vs index coalesce vs index shrik space索引IndexRebuild
- zt_如何加速索引index建立索引Index
- 聊聊索引Index Rebuild和Rebuild Online(下)索引IndexRebuild
- 聊聊索引Index Rebuild和Rebuild Online(上)索引IndexRebuild
- ORA-08104@ONLINE_INDEX_CLEANIndex