How IDs Storage Optimizations work
IDS storage optimization takes into account the entire row and all of its columns (in addition to storing column data, such as BLOB data, that is outside the row as a byte string). IDs then looks for recurring patterns, storing these patterns as symbols in the compression dictionary, as shown in Figure 1.
Figure 1. Patterns stored as symbols in dictionaries
After the dictionary is created, IDs stores it in the dictionary repository.
The storage optimization process for a table involves four steps:
Create a compressed dictionary.
Compresses data in rows in a table or table fragment.
Regroup a table or fragment row.
Reclaim the free space.
Each step is discussed in detail in the following sections.
Create a compressed dictionary
To create a dictionary, IDs samples some rows from an existing table and creates a dictionary of symbols that represent byte patterns. IDs stores the dictionary in the Dictionary repository. Each dbspace that contains a compressed partition has a dictionary repository. Dictionaries are also stored in memory, which enables queries and updates to compress and decompress data quickly.
The size of each dictionary is approximately 75KB. However, each dictionary can grow to 150KB. IDS stores a compressed dictionary of each compressed partition in memory. Therefore, DBAs must take these resource requirements into account.