How to stop looking in a database after X rows are found?
Posted
by morningface
on Stack Overflow
See other posts from Stack Overflow
or by morningface
Published on 2010-03-31T02:41:30Z
Indexed on
2010/03/31
2:53 UTC
Read the original article
Hit count: 287
I have a query to a database that returns a number X of results. I am looking to return a maximum of 10 results. Is there a way to do this without using LIMIT 0,9? I'll use LIMIT if I have to, but I'd rather use something else that will literally stop the searching, rather than look at all rows and then only return the top 10.
© Stack Overflow or respective owner