
Ultimate access to all questions.
You need to perform a complex SQL query to transform data in an Amazon Redshift cluster. The query involves multiple joins, aggregations, and a window function. Which of the following strategies would you use to structure the query for optimal performance?
A
Use EXPLAIN to analyze the query execution plan and optimize the query.
B
Break down the query into smaller, more manageable subqueries and use WITH clauses.
C
Ensure that the tables involved in the query are properly sorted and distributed.
D
All of the above.