Home / DE Professional practice test / Cost & Performance Optimisation / Question

Databricks Data Engineer Professional · free practice question

A Silver layer Delta table is partitioned by `transaction_date` and a nightly maintenance job runs `OPTIMIZE ... ZORDER BY (customer_id)` on the latest…

Exam-style question on Cost & Performance Optimisation from the free DE Professional practice test, with the answer and a full explanation below.

Updated November 16, 2026

Cost & Performance Optimisation Hard

A Silver layer Delta table is partitioned by transaction_date and a nightly maintenance job runs OPTIMIZE ... ZORDER BY (customer_id) on the latest partition. The team is evaluating a migration to liquid clustering. Which of the following accurately describes the KEY behavioral difference between Z-ordering and liquid clustering's OPTIMIZE that is most relevant to this decision?

  1. ABoth use the same Hilbert space-filling curve for co-location. The practical difference is scheduling: liquid clustering runs through predictive optimization, while ZORDER BY needs an explicitly scheduled OPTIMIZE job on the latest partition.
  2. BZ-ordering is idempotent: repeated runs on the same data converge and later runs become no-ops. Liquid clustering OPTIMIZE is also idempotent and differs mainly by adding row-level concurrency for concurrent writers through deletion vectors.
  3. CZ-ordering is not incremental: each OPTIMIZE ... ZORDER BY run can rewrite previously Z-ordered files in the partition to fit new data. Liquid clustering OPTIMIZE is incremental and rewrites the files that are unclustered or need reclustering.
  4. DThe main difference is capacity: liquid clustering accepts up to 32 clustering keys while Z-order accepts at most 4 columns, which makes liquid clustering the stronger choice for multi-dimensional filtering workloads on this Silver table.
  5. EZ-ordering applies on top of a partitioned table with no schema change. Liquid clustering needs ALTER TABLE REMOVE PARTITIONING to drop the existing partitions before it is enabled, and that statement triggers a full table rewrite.
Answer & explanation

Correct answer: C

WHY C: This is the documentation-backed key distinction. ZORDER is documented as NOT idempotent: 'Z-ordering is not idempotent but aims to be an incremental operation.' For a table with daily appends, each new batch of data is scattered across files and is re-incorporated into the Z-order layout on the next OPTIMIZE run, potentially causing wide rewrites of already-Z-ordered files in the same partition. Liquid clustering's OPTIMIZE is designed to be incremental: it rewrites the data files that need clustering (not yet processed, or with enough unclustered data to justify rewriting) and skips files already in a good clustering state. This dramatically reduces write amplification for tables with frequent incremental writes, making nightly maintenance jobs shorter and less resource-intensive.

WHY NOT A: Z-ordering in Delta Lake does not use Hilbert curves in the same way as liquid clustering. More importantly, the incremental vs. non-incremental nature of OPTIMIZE is a more fundamental and exam-relevant difference than the scheduling method.

WHY NOT B: Z-ordering is explicitly documented as NOT idempotent. It aims to be incremental but does not converge to a no-op on subsequent runs.

WHY NOT D: Liquid clustering supports a maximum of FOUR clustering keys, not 32. The 32-column figure is the default number of columns for which statistics are collected, not clustering key capacity.

WHY NOT E: ALTER TABLE REMOVE PARTITIONING is not a supported Delta Lake command. Migration from partitioned + ZORDER to liquid clustering uses a CTAS approach without PARTITION BY, not an ALTER TABLE modification.

Take the full DE Professional practice test free →

Would you pass today?

This question is one of 60 in the free, timed Databricks Data Engineer Professional practice test. Take it and get a section-by-section score.

Start the free test →