ifixkart-admin/.agents/skills/mysql_query_optimizer/SKILL.md
Adithiyan bbd3a3e959 feat: initial commit — full platform snapshot
- Backend: FastAPI app with all models, services, schemas, routes
- Admin Panel: Next.js dashboard with all modules
  (CRM, POS, repairs, warranties, billing, notifications, etc.)
- Ecommerce: storefront (submodule) + product catalog
- AI Agents: .agents/ skill library for Antigravity IDE
- Docs: architecture, billing, notification gateway markdown
- Submodules: Backend/OpenWA, Ecommerce/File 2/storefront
2026-10-13 12:59:47 +05:30

957 B

name description
MySQL Query Optimizer Audits query performance, explains query execution plans, and identifies index gaps to prevent database bottlenecks.

Skill: MySQL Query Optimizer

1. Purpose

Optimize API latency and database load by ensuring all SQLAlchemy queries use appropriate database indexes.

2. When to Use

During backend development when introducing new select queries or filters, or during performance profiling.

3. Step-by-Step Checklist

  1. Identify SQLAlchemy queries generated by the feature endpoints.
  2. Run EXPLAIN <query> on the SQL queries using MySQL Toolbox.
  3. Analyze execution plan:
    • Check if queries do full table scans (type: ALL).
    • Identify if key column displays used indexes.
    • Verify rows processed values are minimized.
  4. Add composite indexes on columns frequently filtered or joined together.
  5. Prevent N+1 query patterns in SQLAlchemy by using joined or subquery loading.