QuestionQ184

VerifiedData Processing & Transformations

A data engineer is using the Databricks OPTIMIZE command on a Delta table.

What happens when OPTIMIZE is run twice on the same table with the same data?

Explanation

The standard bin-packing OPTIMIZE operation is idempotent: once a Delta table's files have been compacted into optimally sized files, running OPTIMIZE again on the same unchanged data finds nothing left to compact and makes no further changes. This differs from ZORDER, which is not strictly idempotent since it can incrementally re-cluster data on subsequent runs. Learn more: OPTIMIZE - Databricks

Community Discussion

No comments yet. Be the first to start the discussion!