
Answer-first summary for fast verification
Answer: Run OPTIMIZE command with z-ordering on timestamp, set auto-compaction to true, and use VACUUM with a retention interval of 1 day.
Using the OPTIMIZE command with z-ordering on timestamp helps in clustering time-series 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 log data from a web application. The table includes columns like log_level, timestamp, user_id, and message. 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 timestamp, set auto-compaction to true, and use VACUUM with a retention interval of 1 day.
B
Run OPTIMIZE command with z-ordering on user_id, disable auto-compaction, and use VACUUM with a retention interval of 7 days.
C
Run OPTIMIZE command with z-ordering on log_level, set auto-compaction to true, and use VACUUM with a retention interval of 30 days.
D
Run OPTIMIZE command with z-ordering on message, disable auto-compaction, and do not use VACUUM.
No comments yet.