What problem does it solve?
It helps you analyze slow or inefficient MySQL queries in real applications by grounding recommendations in the actual SQL, the real schema/indexes, and EXPLAIN evidence rather than guesswork.
Core Features & Use Cases
- Query-first investigation: Reconstructs the real SQL from provided SQL or Laravel/Eloquent/query-builder code, including filters, joins, ordering, grouping, and pagination details.
- Schema and index verification: Reviews relevant tables and index definitions via schema output, migrations, and model relationships before suggesting any changes.
- EXPLAIN-driven diagnosis: Interprets EXPLAIN outputs (table/type/keys/rows/filtered/Extra) to identify full scans, weak join strategies, non-SARGable predicates, poor sort/group plans, and pagination issues.
- Safe, justified optimization proposals: Prioritizes query rewrites to reuse existing indexes (including SARGable changes and projection/index-covering considerations) and only recommends index additions when the rewrite cannot close the gap.
Quick Start
Use the mysql-problem-solver skill to analyze the slow MySQL query by providing the SQL (or the Laravel/Eloquent code that builds it), the relevant schema/migrations, and any available EXPLAIN output.