On Sun, 16 May 1999 22:02:57 +0300, Mark Papadakis wrote:
>mysql> select sum(points) from mt where mt.wid<100 limit 10;
>Over 10 mins, got bored waiting to return and i stopped it.
from the fact that the first query took several seconds it is obvious
that the table is very large [relative the system]. The second query
sums _all_ rows with mt.wid < 100. Limit is applied to the result set,
in this case only one (the sum). Thus, the first query stops after
finding 10 rows matching. The second stops only after finding all
matching rows.
-Sincerely, Fred
(Frederik Lindberg, Infectious Diseases, WashU, St. Louis, MO, USA)