Lucas Zago

04/06/2023, 5:27 PM
Hi guys, z-ordering a delta table always it is considered a good practice? There is some article speaking about it?

Joe Russell

04/06/2023, 5:39 PM
Hi @Lucas Zago -- check out the docs here -- You won't always want to z-order a table, only z-order when read performance is important (ie gold-level tables that will be queried by end users; source tables for streaming pipelines with low-latency requirements). Z-ordering will really help on columns with numeric data types, like primary and foreign keys in a star-schema data model. Z-ordering should not be done on every column, only columns that will most often be used in join conditions or predicates of queries.
🎉 1

Jim Hibbard

04/06/2023, 5:40 PM
Hi Lucas, for rules of thumb on optimizing a table for query performance you should check out my recent post. I link blogs and documentation that go more deeply into how to perform both.
👍 1