Unlike PostgreSQL, MySQL/InnoDB requires indexes on foreign key columns. Missing indexes cause slow JOINs.
Why This Matters
InnoDB automatically creates indexes on foreign key columns if missing, but these auto-indexes may not be optimal. Explicit indexes ensure proper query planning.
Tags
MySQLMariaDBDB Linting
Related Rules
Catch this automatically on every PR
BeforeMerge scans your pull requests against this rule and 3+ others. Get actionable feedback before code ships.