MySQL tip: composite index order matters — (customer_id, created_at) is not interchangeable

_jaydeepkarale · x · 2026-10-12

A production MySQL tip: a composite index on (customerid, createdat) is not interchangeable with one on (createdat, customerid) — column order matters. Indexes should be designed around your actual filters, joins, and sorting rather than just the columns appearing in the query.

Original post →

More from coding & agent

coding & agent channel →