Databricks Data Analyst Associate · Section 5 · 15% of the exam
Apply Liquid Clustering to improve query speed when filtering large tables on specific columns.
One of the objectives of the Databricks Certified Data Analyst Associate exam, in the section “Analyzing Queries”. Here is what it covers, the points to remember and a question to try.
What it covers
Find poorly performing queries with Query History, the duration breakdown, performance insights and the query profile, choose the right fix (query, warehouse or layout), and use liquid clustering so filters on large tables skip most files.
Points to remember
- Triage: Query History (filter by duration) → duration breakdown → query profile Top operators → performance insights → fix → re-run and compare.
- Wall-clock duration = scheduling + optimization and file pruning + execution; aggregated task time sums all cores and can exceed wall-clock time.
- Query profile: Details, Top operators and Query text tabs; graph metrics Time spent, Memory peak, Rows; needs ownership or CAN MONITOR; Download JSON to share beyond CAN MANAGE.
- Exploding join (rows out far above rows in) → fix the join keys; spill → scale up (size); queuing → scale out (max clusters).
- Performance insights are ranked by projected impact; Optimize opens Genie Code (formerly Databricks Assistant); Accelerated insights need no action.
Try a question
A table is liquid-clustered by order_date. An analyst runs ALTER TABLE workspace.sales.orders CLUSTER BY (region, order_date). What happens to the data already in the table?
- AEvery existing data file is rewritten immediately so it matches the new keys
- BNothing is rewritten now; later writes and OPTIMIZE runs use the new keys
- CThe statement fails because clustering keys can be set only at table creation
- DThe table becomes partitioned by
regionand clustered byorder_date
Show the answer
B. Changing clustering keys is a metadata change. Later writes and OPTIMIZE runs cluster by the new keys, but existing files are not rewritten until you run OPTIMIZE ... FULL, which Databricks recommends after enabling clustering or changing keys.
Written for practice in the style of the exam: never a question from the real exam.
In the course
The lesson Query Insights, the query profile and liquid clustering teaches this objective (about 45 minutes), and 15 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.
More in this section
- Understand the Features, Benefits, and Supported Workloads of Photon.
- Identify poorly performing queries in the Databricks Intelligence platform, such as Query Insights, Query Profiler log, etc.
- Utilize Delta Lake to audit and view history, validate results, and compare historical results or trends.
- Utilize query history and caching to reduce development time and query latency
- Fix a query to achieve the desired results.