Revamp MySQL Query Optimization and Overcome Slowness of ORDER BY with LIMIT Queries
Percona
DECEMBER 21, 2023
However, for 16 years since 2007, the MySQL query optimizer has had a “bug” that not only makes LIMIT 1 slower than LIMIT 10 but can also make the former a table scan, which tends to cause problems. You must understand how to use indexes to make sorting cheaper. Looking at this, can you say which is faster: LIMIT 1 or LIMIT 10 ?
Let's personalize your content