Can I paste a slow query and get an optimized version back?
Yes, that is the core workflow. Paste your query, optionally include the EXPLAIN or EXPLAIN ANALYZE output, and provide context about your table sizes and existing indexes. It will analyze the execution plan, identify bottlenecks (sequential scans, inefficient joins, missing indexes, poorly structured subqueries), and produce a rewritten query. It explains each change: 'The nested subquery on line 12 is executed once per outer row — moving it to a CTE makes it execute once.'