- 论坛徽章:
- 0
|
If you use LIMIT row_count with ORDER BY, MySQL ends the sorting as soon as it has found the first row_count rows of the sorted result, rather than sorting the entire result. If ordering is done by using an index, this is very fast. If a filesort must be done, all rows that match the query without the LIMIT clause must be selected, and most or all of them must be sorted, before it can be ascertained that the first row_count rows have been found. In either case, after the initial rows have been found, there is no need to sort any remainder of the result set, and MySQL does not do so.
上面这段话来自mysql官方手册, 对于MySQL ends the sorting as soon as it has found the first row_count rows of the sorted result, rather than sorting the entire result. 这里面的sorted result, 这个结果集的含义包含哪些记录不是很理解. 请大家指点下,谢谢 |
|