Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Right, that's why I add it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: