Microsoft Fabric Data Engineer (DP-700) · Section 3 · 33% of the exam
Optimize query performance
One of the objectives of the Microsoft Certified: Fabric Data Engineer Associate (exam DP-700: Implementing Data Engineering Solutions Using Microsoft Fabric) exam, in the section “Monitor and optimize an analytics solution”. Here is what it covers, the points to remember and a question to try.
What it covers
Spark performance in Fabric comes from the right pool and session type, the native execution engine, resource profiles, sensible Spark settings and a healthy table layout. Query performance means writing T-SQL, KQL and Spark SQL that read less data, using statistics, caches and materialized views, and measuring with queryinsights and the Spark UI.
Points to remember
- Starter pool: Medium nodes only, session starts in about 5 to 10 seconds; custom pools, libraries, Private Link or managed VNet add minutes.
- 1 capacity unit equals 2 Spark VCores; bursting allows 3 times the base cores (F64: 128 base, 384 burst).
- High concurrency: same user, workspace, default lakehouse, Spark configuration and libraries; up to 5 notebooks; session tag in pipelines.
spark.fabric.resourceProfile: writeHeavy (default), readHeavyForSpark, readHeavyForPBI, custom; runtime setting overrides environment.- Native execution engine:
spark.native.enabled, Runtime 1.3 and 2.0, automatic fallback, no structured streaming, JSON and XML not accelerated, look for Transformer nodes.
Try a question
A job joins a 400 GB fact table to a 30 MB dimension, and the Spark UI shows a large shuffle for the join. What is the simplest improvement?
- ABroadcast the dimension table with the broadcast() hint
- BIncrease spark.sql.shuffle.partitions to 5,000 for the join stage
- CCache the fact table
- DConvert the dimension to CSV
Show the answer
A. A broadcast join sends the small table to every executor and avoids shuffling the big table. The default autoBroadcastJoinThreshold is 10 MB, so a 30 MB table needs a hint or a higher threshold.
Written for practice in the style of the exam: never a question from the real exam.
In the course
The lesson Optimize Spark performance and query performance teaches this objective (about 55 minutes), and 20 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
- Monitor data ingestion
- Monitor data transformation
- Monitor semantic model refresh
- Configure alerts
- Identify and resolve pipeline errors
- Identify and resolve dataflow errors
- Identify and resolve notebook errors
- Identify and resolve eventhouse errors
- Identify and resolve eventstream errors
- Identify and resolve T-SQL errors
- Optimize a lakehouse table
- Optimize a pipeline