Aid-Abhishek
Databricks Partner

Z-Ordering physically sorts data using multi-dimensional ordering, but degrades as new data arrives — requiring full, expensive OPTIMIZE reruns to maintain.

Liquid Clustering (DBR 13.3+) replaces both Z-Ordering and Hive partitioning. You define it once with CLUSTER BY (col1, col2) and OPTIMIZE only rewrites "drifted" files incrementally — much cheaper.

Key wins with Liquid Clustering:

  • No partition management
  • Handles high-cardinality columns better
  • Cluster keys changeable via ALTER TABLE
  • Stays efficient on append-heavy tables

Bottom line: For any new table, go with Liquid Clustering. Z-Ordering is legacy at this point.