Re:SQL Anti-Patterns You Should Avoid
by sgarland on Saturday October 18, 2025 @08:36PM
(#45631337)
If you include an ORDER BY, the DB _may_ continue searching. MySQL (and, I assume, MS SQL Server, since it also can cluster the PK) can stop early in some circumstances.
But if you just have a LIMIT, then no - any RDBMS should stop as soon as it’s reached your requested limit.
But if you just have a LIMIT, then no - any RDBMS should stop as soon as it’s reached your requested limit.