-werners-
Esteemed Contributor III

Z-Order will make sure that in case you need to read multiple files, these files are co-located.

For a single file this does not matter as a single file is always local to itself.

If you are certain that your spark program will only read a single file, you do not need z-ordering.

But it might be the case that your delta lake table is also read by another program, not using the partition filter. then it will become interesting, or if you have multiple files per partition.

Z-Ordering and partitioning are complementary techniques.

Z-Ordering is especially interesting for columns on which you cannot/don't want to partition (high cardinality)

View solution in original post