This documentation is for an older version. If you're using the most current version, select the documentation for that version with the version switch in the upper right corner of the online documentation, or by downloading a newer PDF or EPUB file. Optimizing LIMIT Queries

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