
Ultimate access to all questions.
As a Microsoft Fabric Analytics Engineer Associate working with a Spark notebook in Azure Databricks, you are tasked with optimizing the performance of a complex SQL query that involves multiple subqueries and temporary tables. The query is part of a critical reporting process that must complete within a tight SLA, and the dataset is expected to grow significantly over time. Considering the need for scalability, maintainability, and performance, which of the following approaches would you take to improve the performance of the query? (Choose one option.)
A
Rewrite the query to use common table expressions (CTEs) instead of subqueries to enhance readability and potentially improve execution plan efficiency.
B
Utilize the 'cache' command to store the temporary tables in memory, reducing disk I/O for repeated access to the same data.
C
Add more indexes to the tables involved in the query to speed up data retrieval, assuming the tables are not already optimally indexed.
D
Implement a distributed cache to store intermediate results of the query, minimizing redundant computations across the cluster.