Starts at 2:15:00 in this video — SQL Warehouse full course — performance section (2:15:00)
Liquid Clustering
Declare cluster keys on a Delta table. Databricks incrementally reclusters files. Filters on those keys skip files. “Partition by 40 high-cardinality columns” is usually the wrong advice. The exam asks you to apply Liquid Clustering to improve query speed when filtering large tables on specific columns.
OPTIMIZE and VACUUM
- OPTIMIZE — compact small files (better scans).
- VACUUM — remove obsolete files; shortens time travel.
Fix the query, not the dashboard
If counts are wrong, look at missing GROUP BY, join grain, or WHERE that converted a left join to inner. Visualization type will not fix a duplicated fact.