Advanced
SQL Query Performance Tuning
Optimize a highly inefficient SQL query by analyzing execution plans and indexing strategies.
📝 Contenido del prompt
Given a provided schema definition and a slow, complex SQL query involving multiple joins and subqueries, analyze the potential bottlenecks. Rewrite the query to improve performance. Explain the specific execution plan changes you expect, recommend necessary indexing strategies to support the new query, and discuss the trade-offs of your suggested approach regarding write performance vs. read speed.