Performance of in-place alters for DDL operations
In-place alter operations on data definition language (DDL) statements can slow performance. Therefore, monitor outstanding in-place alter operation because many outstanding alter operations affect subsequent ALTER TABLE statements.
The oncheck -pT command displays data-page versions for outstanding in-place alter operations. An in-place alter is outstanding when data pages still exist with the old definition.
- A value of
2
in the Count field for the oldest version indicates that two pages use the oldest version. - A value of
0
in the Count fields for the next four versions indicates that no pages were to the latest table definition.
You can remove in-place alter operations by running the admin( ) or task( ) SQL administration command with the table update_ipa or fragment update_ipa argument. You can include the parallel option to run the operation in parallel. For example, the following statement removes in-place alter operations in parallel from a table that is named auto:
EXECUTE FUNCTION task('table update_ipa parallel','auto');
UPDATE tab1 SET col1 = col1;
If your goal is saving runtime CPU, then plan to keep as few outstanding alters operations on a table as possible (generally no more than 3 or 4). If your goal is to save on disk space and your alter operations add or grow columns, then leaving in-place alters outstanding helps reduce disk space. If you need to revert to an earlier version of the database server, however, one requirement is that no data pages can include incomplete ALTER TABLE or ALTER FRAGMENT operations.
After all outstanding in-place alter operations have been completed on a table or fragment, the oncheck -pT command displays the total number of data pages in the Count field for the current version of the table.