Courseiva
Analyzing Queries →mediumMultiple Choice

Databricks-DA-Assoc Analyzing Queries Practice Question

An analyst executes a query that joins a large fact table with a small dimension table in Databricks. The analyst wants to force the Catalyst optimizer to broadcast the small dimension table to avoid an expensive shuffle join. Which standard Spark SQL hint should be included in the query text?

⚠ Common exam trap

Candidates frequently mistake generic Spark configuration settings for SQL-specific hints, or they attempt to use incorrect syntax like '/*+ BROADCASTJOIN */' instead of the standard '/*+ BROADCAST(table) */' syntax.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

/*+ BROADCAST(dimension_table) */

Query hints allow analysts to provide explicit instructions to the Catalyst optimizer regarding physical execution plans. The MAPJOIN or BROADCAST hint directs the engine to broadcast the smaller table to all worker nodes, eliminating the need for a costly shuffle exchange across the network and greatly accelerating join execution performance.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    /*+ MERGE(dimension_table) */

    Why it's wrong here

    The MERGE hint instructs the Catalyst optimizer to select a Sort-Merge Join strategy rather than a broadcast join. Sort-merge joins require heavy shuffling and sorting operations on both datasets, which is counterproductive when attempting to optimize joins involving a very small dimension table.

  • ✗

    /*+ SHUFFLE_HASH(dimension_table) */

    Why it's wrong here

    The SHUFFLE_HASH hint forces the engine to use a shuffle hash join algorithm instead of a broadcast join. This strategy still requires partitioning and shuffling both datasets across the cluster network based on join keys, which introduces significant latency compared to memory-based broadcasting.

  • ✓

    /*+ BROADCAST(dimension_table) */

    Why this is correct

    The BROADCAST hint explicitly requests that the Catalyst optimizer send a copy of the specified table to all worker nodes in the cluster. This enables a broadcast hash join, completely eliminating the network shuffle phase and improving performance for joins involving small tables.

  • ✗

    /*+ CACHE(dimension_table) */

    Why it's wrong here

    The CACHE keyword is not a valid SQL query hint syntax in Apache Spark for influencing physical join plans. While caching tables in memory improves subsequent read speeds, controlling join execution strategies requires specific hints like BROADCAST, MERGE, or SHUFFLE.

About these practice questions

Courseiva writes every Databricks-DA-Assoc question from scratch — 291 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Databricks exam blueprint

This Databricks-DA-Assoc practice question is part of Courseiva's free Databricks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Databricks-DA-Assoc exam.