DBAs perform table reorganization when the table size growth and becomes fragmented over the large number of extents on the hard drive, which leads to SQL query performance degradation. Also the database server does not automatically releases the physical space consumed by deleted rows in the table. As a result, when the number of deleted rows growth, the data in the table has to be manually compacted, to free the extent space occupied by deleted rows.
The Table Reorganization wizard allows you to choose between the following two table reorganization methods:
The second method is faster and simpler because it does not require data export and import operations and also does not affect dependent objects/user permissions but it requires the table dbspace to have at least as much free space as the current table size. Also the size of the first extent for a table can not be modified using this reorganization method.
The first method allows to modify the first extent size parameter and it does not require an additional space in the table dbspace but it is slower because it involves exporting/importing of the table data and less safe because dropping of a table implicitly removes dependent objects, such as views, triggers, foreign key constraints from other related tables and user permissions. If performed manually, this reorganization method requires a number of steps, which have to carefully performed in the exact order:
The Table Reorganization wizard performs all above tasks automatically and also creates you a full script for the operation. You can choose to run this script from the wizard itself or run it using other tools.