Partition defragmentation

You can improve performance by defragmenting partitions to merge non-contiguous extents.

A frequently updated table can become fragmented over time, which degrades performance every time the table is accessed by the server. Defragmenting a table brings data rows closer together and avoids partition header page overflow problems. Defragmenting an index brings the entries closer together, which improves the speed at which the table information is accessed.

Before you defragment a table, index, or partition, be sure that none of the following conflicting operations are in progress:

You cannot defragment the following objects:

To determine how many extents a table, index, or partition has, you can run the oncheck -pt command.

To defragment a table, index, or partition, run the SQL administration API task() or admin() function with the defragment argument or the defragment partnum argument and specify the table name, index, or partition number that you want to defragment.

You cannot stop a defragment request after you run the command.

If there are problems in completing a defragment request, error messages are sent to the online log file.


Copyright© 2019 HCL Technologies Limited