Full Prompt
View Source1. Examine the slow query and its execution context (e.g., ORM usage). 2. Identify missing indexes or inefficient JOINs/N+1 problems. 3. Rewrite the query for raw performance. 4. Explain how the database engine interprets the optimization.