匿名用户关于8.0中,Using filesort 提示,但是使用了索引,
create table `test_order` (
`id` int not null auto_increment comment 'id',
`a` int unsigned not null default '0',
`b` int unsigned not null default '0',
`c` varchar(64) not null default '',
`d` int default null,
primary key (`id`),
key `idx_a_b_c` (`a`,`b`,`c`),
key `idx_d` (`d`)
)
mysql> explain select * from test_order where a = 100 order by c\G
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: test_order
partitions: NULL
type: ref
possible_keys: idx_a_b_c
key: idx_a_b_c
key_len: 4
ref: const
rows: 1
filtered: 100.00
Extra: Using filesort
不理解,明明走了索引,怎么还是filesort??
我来答
添加附件
收藏
分享
问题补充
1条回答
默认
最新
回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
墨值悬赏

评论
