關於如何釋放表空間的問題(About Reclaimable Unused Space)

zhangsharp20發表於2015-12-09
Over time, performing insert, update, and delete operations (also referred to as DML operations) on objects within a tablespace can create pockets of empty space that individually are not big enough to be reused. Collectively, these pockets can waste large amounts of space. The sparsely populated objects that result can degrade performance during queries and DML operations.

隨著時間的流逝,在表空間的物件上執行DML操作會產生單個的不是足夠大用來重新使用的空間,但是如果這些空的空間彙總起來的話會產生空間的巨大浪費,這些極度分散的不斷增加的物件會導致查詢和DML操作效能的下降。

Oracle Database enables you reclaim this empty space with the following online operations—that is, operations that do not block queries or DML against affected objects while the operations are proceeding:

oracle會使你能夠在開機狀態下釋放這些空的空間
,而且這些操作不會阻塞任何查詢或DML對於收縮的物件

  • Online segment shrink

    Online segment shrink operates on table segments and on the segments of the dependent objects of the table, such as indexes and partitions. For each segment, data is compacted to the front of the segment. Free space can either be returned to the tablespace or kept in the segment for future insert operations.

    Online segment shrink is permitted only on segments in a locally managed tablespace with automatic segment space management. Online segment shrink is an in-place operation; no additional free space in the tablespace is required.

現在段收縮是對錶的段和所有依賴於這個表的段進行的,例如索引和分割槽。對於每個段,資料都會在段壓縮之前進行壓縮。釋放的空間要麼返回給表空間要麼被儲存在段中供未來的insert操作使用。
線上段收縮只對本地ASSM管理的段有效。線上段收縮是一個本地化的操作,不需要額外的表空間。

  • Online table redefinition (also known as reorganization)

    Reorganization relocates the table and its dependent objects in a different part of the tablespace. This operation has the desirable side effect of compacting the data for those objects. For this operation to succeed, however, the tablespace must have free space equal to the size of the table and its dependent objects. Reorganization is the only permitted operation for dictionary-managed tablespaces or for locally managed tablespaces with manual segment space management.

表重組會重新分配在表空間的不同部分的表和它的相關依賴物件的位置。這個操作對這些物件資料的壓縮有著很好效果。然而對於這個操作而言,如果想要成功,表空間必須有等於表和其依賴的物件所佔有的空間的和的剩餘空間,重組只是對於基於詞典管理的表空間或者本地手工段空間管理的表空間才有效。

The Segment Advisor generates recommendations for shrinking or reorganizing segments that have a significant amount of reclaimable unused space.

顧問工具會生成推薦資訊關於收縮和重組有著大量需要釋放的空間的段。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29802484/viewspace-1869280/,如需轉載,請註明出處,否則將追究法律責任。

相關文章