mysql多列排序
来源:互联网 发布:网络安全管理责任书 编辑:程序博客网 时间:2024/06/05 06:09
排序字段应保持一样的顺序(逆序或者降序),则使用索引排序。否则将使用文件排序
mysql> explain select id,time from edu_text order by count desc, time desc ;
+----+-------------+----------+-------+---------------+-------+---------+------+------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+----------+-------+---------------+-------+---------+------+------+-------------+
| 1 | SIMPLE | edu_text | index | NULL | count | 8 | NULL | 5 | Using index |
+----+-------------+----------+-------+---------------+-------+---------+------+------+-------------+
1 row in set (0.00 sec)
mysql> explain select id,time from edu_text order by count desc, time asc ;
+----+-------------+----------+-------+---------------+-------+---------+------+------+-----------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+----------+-------+---------------+-------+---------+------+------+-----------------------------+
| 1 | SIMPLE | edu_text | index | NULL | count | 8 | NULL | 5 | Using index; Using filesort |
+----+-------------+----------+-------+---------------+-------+---------+------+------+-----------------------------+
1 row in set (0.00 sec)
- mysql多列排序
- MySQL对列排序,分组排序
- mysql 按照多列排序,select order by...
- 多列排序
- 多列快速排序
- GridView多列排序
- mshflexgrid多列排序
- MSHFlexGrid多列排序
- Datatable多列排序
- mysql 某列指定值靠前排序
- mysql 某列指定值靠前排序
- mysql 某列指定值靠前排序
- mysql 多列连接
- MySQL多列分区
- Mysql多列索引
- MySQL多列索引
- mysql多列索引
- Mysql多列删除
- ubuntu PostgreSQL数据库从零入门到高手
- <input id="type" value="1"> 跳转中...<br>
- BZOJ3505 [Cqoi2014]数三角形
- php常见错误小记
- KBEngine服务端源码分析笔记
- mysql多列排序
- Node.js 介绍文章
- 记录一次,三次握手中缺少第二次握手导致的问题(即缺少SYN ACK返回,实际是tcp_tw_recycle设置导致的问题)
- 一款很好用的,免费的外网映射工具Ngrok 国内版,可以满足基本的开发测试需求
- AS基本快捷键
- 写给小白的编程入门Tips
- Linux ERROR 2002 (HY000): Can't connect to local MySQL server through socket和 Couldn't find MySQL se
- 迷之阶梯(动态规划)
- Spring Boot打jar包时指定main方法入口