A worked example, rendered from real sample data. Sign in to run the tool on your own input.
SELECT * FROM users u LEFT JOIN posts p ON u.id = p.user_id WHERE u.status = 'active' OR u.premium = true ORDER BY u.created_at DESC LIMIT 1000SQL Query Optimization Analysis
══════════════════════════════════════════════════
❌ ISSUE: Using SELECT *
→ Explicitly list required columns for better performance
⚠ Recommendation: Index columns used in WHERE clause
→ Consider index on: U.STATUS = 'ACTIVE' OR U.PREMIUM = TRUE
⚠ Recommendation: Consider index on ORDER BY columns
══════════════════════════════════════════════════
Estimated Performance: MODERATE
Suggestions Applied: 2-3 optimizations possible
Analyze SQL queries for optimization suggestions and performance improvements. Part of the DevTools Surf developer suite. Browse more tools in the Developer Utilities collection.