mysql 索引和orderby
来源:互联网 发布:2017网络效应判断题 编辑:程序博客网 时间:2024/06/05 16:30
k int unsigned not null auto_increment,
a date,
b varchar(24),
c int,d varchar(24),
primary key(k),unique key a_index (a DESC,b DESC),
key k1(b),key k2(c),key k3(d));
explain select b from T WHERE b like 'aaa%'\G;
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: T
partitions: NULL
type: index
possible_keys: k1
key: k1
key_len: 75
ref: NULL
rows: 1
filtered: 100.00
Extra: Using where; Using index
1 row in set, 1 warning (0.01 sec)
ERROR:
No query specified
explain select a,b from T WHERE a='2015-10-25' ORDER BY b ASC,c ASC\G;
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: T
partitions: NULL
type: ref
possible_keys: a_index
key: a_index
key_len: 4
ref: const
rows: 1
filtered: 100.00
Extra: Using index condition; Using filesort
1 row in set, 1 warning (0.00 sec)
ERROR:
No query specified
explain select a,b,c from T WHERE a='2015-10-25' ORDER BY b ASC\G;
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: T
partitions: NULL
type: ref
possible_keys: a_index
key: a_index
key_len: 4
ref: const
rows: 1
filtered: 100.00
Extra: Using index condition
1 row in set, 1 warning (0.00 sec)
ERROR:
No query specified
explain select a,b,c from T WHERE a='2015-10-25' ORDER BY a,b\G;
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: T
partitions: NULL
type: ref
possible_keys: a_index
key: a_index
key_len: 4
ref: const
rows: 1
filtered: 100.00
Extra: Using index condition
1 row in set, 1 warning (0.00 sec)
ERROR:
No query specified
- mysql 索引和orderby
- MYSQL orderBy和limit连用陷阱
- mysql中orderby和limit同时使用的bug
- mysql中orderby和limit同时使用的bug
- mysql中orderby和limit同时使用的bug
- mysql中orderby和limit同时使用的bug
- mysql使用orderby 不起作用
- 为排序使用索引 Orderby优化
- 处理 GroupBy 和 OrderBy DESC
- Mysql 架构和索引
- mysql视图和索引
- mysql 索引和优化
- MySQL-索引和优化
- 关于mysql中orderby的几个注意事项
- MySQL关于orderby主键的时间优化
- mysql注入-orderby之后limit位置
- mysql orderby 按照特定值排序
- MySQL的ORDERBY...LIMIT优化思路
- 缓存-为什么需要使用分布式缓存
- JVM 相关知识整理和学习
- 整数转化为字符串
- Java中日期时间
- [LeetCode]Power of Four/Power of Three/Power of Two(Java)
- mysql 索引和orderby
- java快速排序
- web开发中遇到的导致网页开头空白
- UVA11136 Hoax or what STL 或者 HEAP
- 强势回归!poj 1950
- win10系统登陆提示“你的设备处于脱机状态..“解决方案
- 退役
- Xfermode基本使用
- QLibrary 动态加载外部库文件