Liron Amitzi Oracle ACE

Oded Raz Oracle ACE Director

Shrink Oracle Tables Online

Posted by Oded Raz on Feb 7th, 2010 and filed under Main-Performance, Oracle, Tips & Tricks. You can follow any responses to this entry through the RSS 2.0. You can leave a response or trackback to this entry

Oracle Tables that undergo significant data manipulation (DML) activity, such as UPDATE and DELETE operations, can become fragmented and contain free space “Islands” inside the table seegments.

Such fragmentation reduces the efficiency of scaning opreations like full table scans of index scans. Before oracle 10g one should have used “MOVE TABLE” in order to solve this problem.

Oracle 10g inturduced us with new online feature, shrink table.

In order to use the shrink command we need to enable row movment:

alter tableĀ <Table_Name> enable row movement;
--Then we can use shrink table command:
alter tableĀ <Table_Name> shrink space;
Shrink opration does the following :
  • Segment data is compacted
  • High-water mark (HWM) is adjusted to an appropriate location

1 Response for “Shrink Oracle Tables Online”

Leave a Reply

 
Log in / Advanced NewsPaper by Gabfire Themes