
Answer-first summary for fast verification
Answer: Run OPTIMIZE command with z-ordering on machine_id, set auto-compaction to true, and use VACUUM with a retention interval of 1 day.
Using the OPTIMIZE command with z-ordering on machine_id helps in clustering data more efficiently, which is beneficial for read operations. Enabling auto-compaction ensures that small files are periodically merged, improving write performance. Using VACUUM with a short retention interval (1 day) helps in cleaning up unused files quickly.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You are working with a Delta table that contains data from a manufacturing plant. The table includes columns like machine_id, part_id, production_date, and defect_count. Explain how you would optimize this table for the Databricks SQL service, focusing on strategies to reduce query latency and improve data ingestion rates.
A
Run OPTIMIZE command with z-ordering on machine_id, set auto-compaction to true, and use VACUUM with a retention interval of 1 day.
B
Run OPTIMIZE command with z-ordering on part_id, disable auto-compaction, and use VACUUM with a retention interval of 7 days.
C
Run OPTIMIZE command with z-ordering on production_date, set auto-compaction to true, and use VACUUM with a retention interval of 30 days.
D
Run OPTIMIZE command with z-ordering on defect_count, disable auto-compaction, and do not use VACUUM.
No comments yet.