8.2.1.15 LIMIT Query Optimization

In some cases, MySQL handles a query differently when you are using LIMIT row_count and not using HAVING: