# Z-ordering

Glossary, read 10 Nov 2026

**The short answer.** Z-ordering is a technique that colocates related values from several columns in the same set of files, so data skipping can ignore more files when a query filters on those columns. Delta Lake applies it with OPTIMIZE ... ZORDER BY, available from Delta Lake 2.0.0, as an extra pass during compaction.

It is a multi-dimensional clustering: unlike a single-column sort, it keeps files useful for filters on any of the chosen columns, within limits.

Z-order has to be rerun as data arrives. Databricks now recommends liquid clustering instead, and says clustering cannot be combined with ZORDER.

## A sourced example

The Delta Lake optimizations page gives the command OPTIMIZE events ZORDER BY (eventType) and notes that statistics on long string or binary columns are costly to collect.

## Sources

- Delta Lake documentation: optimizations: https://docs.delta.io/latest/optimizations-oss.html (read 10 Nov 2026)

Last reviewed 10 Nov 2026. Canonical: https://datalakehousecompare.com/glossary/z-ordering/
