mysql实战45讲 笔记order by的工作

  order by: 使用explain后再extra 中有 using index 表示使用了覆盖索引 using filesort表示的就是需要排序, Using temporary 需要使用临时表 分配一个内存sort_buffer用于排序,并不是所有的order by都需要排序的,其原因是原来的数据都是无序的。order by id 或者order by的字段与where中的字段做成一个
相关文章
相关标签/搜索