Filters usually use customer_id on a huge Delta table. Which technique can reduce the data read?
Why D is the answer
Z-Order on customer_id
Z-Order clusters related data, so file skipping works better.
In detail
- Z-Order groups related values.
- Filters then read fewer files.
- Choose columns that appear in most filters.
Use case
An illustrative scenario, not a real incident.
Almost every query filters on customer_id. Z-Order keeps related values together, so whole files can be skipped.
See it in different ways
stateDiagram-v2 [*] --> SmallFiles: many small writes SmallFiles --> Compact: OPTIMIZE Compact --> Sorted: V-Order or Z-Order Sorted --> Cleaned: VACUUM removes unreferenced files Cleaned --> SmallFiles: more writes
flowchart TD
Q{"Do filters use the column?"}
Q -->|"Often"| A0["Z-Order on it"]
Q -->|"Rarely"| A1["Choose another column"]Key point: Z-Order improves file skipping.
Why the other options are wrong
- A. VACUUM
- VACUUM removes old files.
- B. A sensitivity label
- A label has no effect on reads.
- C. A shortcut to the same table
- A shortcut reads the same files.

