Reorganize one or more tables to improve performance. By default, reorganization reorganizes all indexes within the selected table.
Space utilization uses the average row size and number of rows to compute the expected minimum number of data pages, and compares the expected minimum to the current number of pages. If space utilization is low, run reorganization.
See Adaptive Server Enterprise 15.7 ESD #2 Performance and Tuning Series: Improving Performance with Statistical Analysis.
Space utilization is 0 when row count is equal to 0. For derived statistics on space utilization, the row count is based on the information from systabstats.
If statistics have not been updated recently and the average row size has changed, or if the number of rows and pages are inaccurate, space utilization may report values greater than 1.0.
Option | Description | Restrictions |
---|---|---|
Compact | Reclaim space and remove row forwarding. | Not supported with all-pages-locked tables. |
Defragmentation | Reorganize data and allow concurrent reads or writes. | Not supported with:
|
Forwarded rows | Remove row forwarding. | Not supported with all-pages-locked tables. |
Rebuild |
|
Requires that the select into database option to be true. Not supported with system tables. |
Reclaim space | Reclaim unused page space resulting from deletions and row-shortening updates. | Not supported with all-pages-locked tables. |
Option | Description | Restrictions |
---|---|---|
Compress | Compress the rows affected by the reorganization. | Available only when one of these reorganization types is selected:
Not available on Adaptive Server versions earlier than 15.7. |
Resume | Start reorganization at the point in a table where the previous reorganization left off. | Available only when one of these reorganization types is selected:
|
Time | Specify the length of time allowed for running reorganization. | Available only when one of these reorganization types is selected:
|
Skip compact extents | Specify the occupancy threshold of the extent. Adaptive Server reorganizes only the
extents for which compactness falls below the occupancy threshold;
extents with a compactness higher than the threshold are not
reorganized. The compactness of an extent is measured as the percentage range (1 – 100) occupancy in that extent (80 is the default). Compactness = (Total space occupied in an extent / Total space in an extent) x 100. |
Available only when Defragmentation is selected. |