A search document carrying the full product description as both an indexed text field and a stored copy, on a catalogue where descriptions run to several pages. The…
A status column where one value covers ninety-four per cent of rows, and an optimiser assuming an even distribution. Histograms are for columns that are skewed and not…
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…