An index on (created_at, status) serving a query that filters on status and ranges on date, which uses the first column and stops. The rule is equality columns…
An index containing every column the query touches means the table is never read, and the plan says Using index. The column order is the design: equality predicates…
The DESC keyword in an index definition was parsed and ignored until 8.0, so mixed-direction sorts always needed a filesort. This only matters for mixed directions — a…
Dynamic mapping infers a type from the first document it sees, which means the schema was decided in 2020 by whichever product was indexed first. The field that…
Filtering on a value inside a JSON array was a full scan until 8.0.17 added multi-valued indexes, and the syntax is unforgiving. The ARRAY keyword in the cast…