Size of Compressed Data Block

Compression affects the actual disk space used by a data file. The four types of compression (bitmap, run-length encoding (RLE), zlib, and index-value) affect disk space differently. For a discussion of data compression unrelated to estimating size requirements, see Data Compression.

If you are not using compression, or if you have enabled RLE compression, skip this calculation and proceed to Stored Data Files.

Note:

Due to sparsity also existing in the block, actual (compressed) block density varies widely from block to block. The calculations in this discussion are only for estimation purposes.

  To calculate an average compressed block size when bitmap compression is enabled:

  1. Determine an average block density value.

    • If the database is loaded, you can see the size of an expanded data block on the Statistics tab of the Database Properties dialog box of Administration Services. Use the value that is displayed for Block Density.

    • If you want to estimate block density prior to loading data, estimate the ratio of existing data values to potential data values.

  2. To determine the compressed block size, perform the following calculation:

    expanded block size * block density 
    = compressed block size

    Write the resulting block size to the cell labeled DD in Table 244, Worksheet: List of Factors That Affect Disk Space Requirements of a Database.

Example

Assume an expanded block size of 1,536 bytes and a block density of 25% (.25):

1,536 bytes 
* .25 
= 384 bytes (compressed block size)