How does MySQL process ORDER BY and LIMIT in a query? May 25, 2022 by Tarik It will order first, then get the first 20. A database will also process anything in the WHERE clause before ORDER BY.