If you create multidimensional clustering (MDC) tables, the performance of many queries might improve, because the optimizer can apply additional optimization strategies. These strategies are primarily based on the improved efficiency of block indexes, but the advantage of clustering on more than one dimension also permits faster data retrieval.
select * from sales
where month = 'March' and region = 'SE'
For this query,
the optimizer can perform a dimension block index lookup to find blocks
in which the month of March and the SE region occur. Then it can scan
only those blocks to quickly fetch the result set.During a rollout deletion, the deleted records are not logged. Instead, the pages that contain the records are made to look empty by reformatting parts of the pages. The changes to the reformatted parts are logged, but the records themselves are not logged.
The default behavior, immediate cleanup rollout, is to clean up RID indexes at delete time. This mode can also be specified by setting the DB2_MDC_ROLLOUT registry variable to IMMEDIATE, or by specifying IMMEDIATE on the SET CURRENT MDC ROLLOUT MODE statement. There is no change in the logging of index updates, compared to a standard delete operation, so the performance improvement depends on how many RID indexes there are. The fewer RID indexes, the better the improvement, as a percentage of the total time and log space.
S + 38*N - 50*P
where N is
the number of records deleted, S is total size
of the records deleted, including overhead such as null indicators
and VARCHAR lengths, and P is the number of pages
in the blocks that contain the deleted records. This figure is the
reduction in actual log data. The savings on active log space required
is double that value, due to the saving of space that was reserved
for rollback.Alternatively, you can have the RID indexes updated after the transaction commits, using deferred cleanup rollout. This mode can also be specified by setting the DB2_MDC_ROLLOUT registry variable to DEFER, or by specifying DEFERRED on the SET CURRENT MDC ROLLOUT MODE statement. In a deferred rollout, RID indexes are cleaned up asynchronously in the background after the delete commits. This method of rollout can result in significantly faster deletion times for very large deletes, or when a number of RID indexes exist on the table. The speed of the overall cleanup operation is increased, because during a deferred index cleanup, the indexes are cleaned up in parallel, whereas in an immediate index cleanup, each row in the index is cleaned up one by one. Moreover, the transactional log space requirement for the DELETE statement is significantly reduced, because the asynchronous index cleanup logs the index updates by index page instead of by index key.
Choose deferred cleanup rollout for very large deletions. In cases where dimensional DELETE statements are frequently issued on many small MDC tables, the overhead to asynchronously clean index objects might outweigh the benefit of time saved during the delete operation.
If the table contains a number of RID indexes, which require row-level processing, use deferred cleanup rollout.
If you want the block space freed by the delete operation to be available immediately after the DELETE statement commits, use immediate cleanup rollout.
If log space is limited, use deferred cleanup rollout for large deletions.
Deferred cleanup rollout consumes additional database heap space on all tables that have deferred cleanup pending.
To disable rollout behavior during deletions, set the DB2_MDC_ROLLOUT registry variable to OFF or specify NONE on the SET CURRENT MDC ROLLOUT MODE statement.
If only nonpartitioned RID indexes exist on the MDC table, deferred index cleanup rollout is supported.