Sort Order Benefits

Column sort order is an important factor in minimizing storage requirements, and maximizing query performance.

Minimize Storage Requirements

Minimizing storage saves on physical resources and increases performance by reducing disk I/O. You can minimize projection storage by prioritizing low-cardinality columns in its sort order. This reduces the number of rows Vertica stores and accesses to retrieve query results.

After identifying projection sort columns, analyze their data and choose the most effective encoding method. The Vertica optimizer gives preference to columns with run-length encoding (RLE), so be sure to use it whenever appropriate. Run-length encoding replaces sequences (runs) of identical values with a single pair that contains the value and number of occurrences. Therefore, it is especially appropriate to use it for low-cardinality columns whose run length is large.

Maximize Query Performance

You can facilitate query performance through column sort order as follows:

For more information

See Choosing Sort Order: Best Practices for examples that address storage and query requirements.