Data Encoding and Compression

Vertica uses encoding and compression to optimize query performance and save storage space.

Encoding

Encoding converts data into a standard format and increases performance because there is less disk I/O during query execution. It also passes encoded values to other operations, saving memory bandwidth. Vertica uses several encoding strategies, depending on data type, table cardinality, and sort order. Vertica can directly process encoded data.

Run the Database Designer for optimal encoding in your physical schema. The Database Designer analyzes the data in each column and recommends encoding types for each column in the proposed projections, depending on your design optimization objective. For flex tables, Database Designer recommends the best encoding types for any materialized flex table columns, but not for __raw__ column projections.

Compression

Compression transforms data into a compact format. Vertica uses integer packing for unencoded integers and LZO for compressed data. Before Vertica can process compressed data it must be decompressed.

Compression allows a column store to occupy substantially less storage than a row store. In a column store, every value stored in a column of a projection has the same data type. This greatly facilitates compression, particularly in sorted columns. In a row store, each value of a row can have a different data type, resulting in a much less effective use of compression. Vertica compresses flex table __raw__ column data by about one half (1/2).

The efficient storage methods that Vertica uses for your database allows you to you maintain more historical data in physical storage.