> Lets say i have 10.000 rows in a table and im searching for only
> one record(one row).
>
> Which one is faster:
> SELECT ....... LIMIT 1
> or just
> SELECT ......

The former, since MySQL stops after finding the first row. In the second
query, MySQL prepares the entire result set even if you only fetch the first
row.


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to