Data Engineer Professional · 13% of the exam

Cost and Performance Optimization: free practice questions

5 sample questions from our 7-question bank for this domain — answers and explanations included. These are the same scenario-based style as the real Databricks exam.

1. When joining a very large fact table with a small dimension table, which technique avoids a costly shuffle of the large table?

  • A. A broadcast join (broadcasting the small table to all executors)✓ Correct
  • B. Shuffling both tables fully
  • C. Collecting both tables to the driver
  • D. Disabling the optimizer
Explanation

Broadcasting the small dimension table to all executors lets each join locally without shuffling the large fact table — much cheaper. A full shuffle of both (B) is expensive, collecting to the driver (C) doesn't scale, and disabling the optimizer (D) removes helpful automation.

2. A pipeline over-provisions a large all-purpose cluster running 24/7 even though it only runs jobs a few hours a day. Which change reduces cost?

  • A. Use job clusters (that spin up per run and terminate after) and/or autoscaling, right-sized to the workload✓ Correct
  • B. Increase the cluster to the largest size permanently
  • C. Run everything on the driver
  • D. Disable autoscaling and pin maximum nodes
Explanation

Job clusters that start per run and terminate afterward (plus autoscaling and right-sizing) avoid paying for idle time. A permanently larger cluster (B), driver-only execution (C), and pinning max nodes (D) all increase cost or reduce scalability.

3. A Delta table suffers from the 'small files problem' after many streaming micro-batches. Which operation compacts small files into larger ones?

  • A. OPTIMIZE (file compaction), or enabling auto-compaction/optimized writes✓ Correct
  • B. DELETE FROM the table
  • C. A broadcast join
  • D. Adding more columns
Explanation

OPTIMIZE compacts many small files into fewer larger ones (and optimized writes/auto-compaction prevent them), improving read performance. DELETE (B) removes rows, a broadcast join (C) is a query technique, and adding columns (D) doesn't address small files.

4. Which Databricks feature accelerates query execution using a vectorized, native engine to reduce cost per query?

  • A. Photon✓ Correct
  • B. VACUUM
  • C. Delta Sharing
  • D. dbutils.widgets
Explanation

Photon is Databricks' vectorized native execution engine that speeds up SQL/DataFrame workloads, improving price/performance. VACUUM (B) is file cleanup, Delta Sharing (C) shares data, and widgets (D) parameterize notebooks.

5. A frequently queried Delta table is partitioned by a very high-cardinality column, producing millions of tiny partitions and slow queries. What is the BEST remediation?

  • A. Repartition on a lower-cardinality column (or use liquid clustering) to avoid excessive small partitions✓ Correct
  • B. Add even more partition columns
  • C. Partition by a unique ID per row
  • D. Store the table as JSON
Explanation

Over-partitioning on high-cardinality columns creates many tiny files/partitions; repartitioning on a lower-cardinality key (or using liquid clustering) fixes this. Adding more partitions (B) or partitioning by a unique ID (C) worsens it, and JSON (D) abandons Delta's optimizations.

2 more questions in this domain

Practice the full bank with instant grading, flashcards, and a timed mock exam.

Start practicing free