Optimize the measured bottleneck
A report slows after frequent micro-batches.
Optimize the measured bottleneck
A report slows after frequent micro-batches. Measure files scanned, warehouse query duration, data movement and Spark stage skew independently. Compact small Delta files when file-open overhead dominates. Measure again against the same query and data volume. For real-time processing observe ingestion latency and transformation throughput before changing stream or Eventhouse capacity.
Decisions to rehearse
- Delta file compaction
- Combining many small files reduces file-open and metadata overhead for subsequent reads.
- Filter and project early
- Restricting rows and columns before expensive operations reduces work when the engine can push the predicates down.
- Spark skew remediation
- A hot shuffle partition can be treated with an appropriate repartitioning or skew-aware strategy.
- Measured copy parallelism
- Copy concurrency can raise throughput until the source, destination or capacity becomes the limit.
- Eventstream throughput and destination diagnostics
- Per-stage throughput and destination health distinguish stream processing delay from sink backpressure.
- KQL query plan and time filtering
- Restricting time ranges and inspecting expensive operators reduces Eventhouse query work.
Practise each Microsoft skill
These local references follow the Microsoft bullet order within this skills group.
- 3.3.1 · Benchmark a Delta scan before and after compacting a comparable set of small files.
- 3.3.2 · Change one pipeline parameter such as parallel copies and measure whether the source or sink becomes saturated.
- 3.3.3 · Inspect an expensive warehouse query and its data movement before changing the load or physical layout.
- 3.3.4 · Compare incoming eventstream rate, destination throughput and Eventhouse query duration during a sustained burst.
- 3.3.5 · Use stage metrics to distinguish skew, shuffle pressure and insufficient memory before adjusting Spark compute.
- 3.3.6 · Narrow a query's time predicate and projected columns, then compare the plan, bytes read and measured duration.
Official skills for this topic
Work through the decision
A dashboard reads the same dates every morning. After several days of micro-batches, file count rises tenfold while data volume barely changes. Which experiment isolates the suspected overhead?
Check your reasoning
Compact a comparable Delta partition, run the same query against comparable input, and compare file count and elapsed time. Inspect query and Spark metrics if the latency persists.
Related lesson in Data Engineer Associate · Troubleshooting and optimization.
Optimize the measured bottleneck quiz
Answer 3 questions. Check each answer for an explanation.