Analyze SQL queries for performance bottlenecks and optimization opportunities
Analyze the following SQL query for performance issues and optimization opportunities: ```sql [PASTE YOUR SQL QUERY HERE] ``` Database system: [PostgreSQL/MySQL/SQL Server/Oracle] Table sizes (approximate rows): [DESCRIBE TABLE SIZES] Current execution time: [TIME IF KNOWN] Please provide: 1. Identification of potential performance bottlenecks 2. Analysis of JOIN efficiency and order 3. Index recommendations with CREATE INDEX statements 4. Query rewrite suggestions for better performance 5. Explanation of why each optimization helps 6. Estimated performance improvement expectations
Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[PASTE YOUR SQL QUERY HERE][DESCRIBE TABLE SIZES][TIME IF KNOWN]