sql-tune reads a SQL query — raw SQL, a .sql file, or even ORM/application code — and explains exactly what it does: the result grain, the join graph, filters, and subtle behavior like a LEFT JOIN quietly acting as an INNER JOIN. It detects the dialect (PostgreSQL, MySQL, SQL Server, Oracle, Snowflake, BigQuery, SQLite) and surfaces impact-ordered optimizations: missing or covering indexes, sargability problems, N+1 patterns, SELECT * waste, and deep-OFFSET pagination. Finally it produces a rewritten query that returns identical results plus the exact EXPLAIN command to confirm the win. It never executes the SQL you hand it.