Skip to content

The index that the query ignores

A table has an index on created_at. This query is slow, and the plan shows a full table scan:

sql SELECT * FROM orders WHERE YEAR(created_at) = 2026;

The index exists and is healthy. Why is it not used?