pangsq's recent timeline updates
pangsq

pangsq

V2EX member #474255, joined on 2020-03-05 10:09:42 +08:00
pangsq's recent replies
Mar 24, 2020
Replied to a topic by gssong MySQL abc 联合索引查 bc 走不走索引
@ahsjs == 见谅,先在 mysql 里跑的后敲在这的,没复制
Mar 24, 2020
Replied to a topic by gssong MySQL abc 联合索引查 bc 走不走索引
explain 一把试试。
1. 用的 mysql 5.6.40 ,innodb
2. create table abcd (a varchar(255), b varchar(255), c varchar(255), d varcahr(255));
3. alter table abcd add index abc(a,b,c);
4. explain select a,b from abcd; # using index
5. explain select b,c from abcd; # using index
6. explain select c,d from abcd; # null
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5414 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 19ms · UTC 07:52 · PVG 15:52 · LAX 00:52 · JFK 03:52
♥ Do have faith in what you're doing.