摘要:一、索引能不能为空 提前建立 email 为索引 1、explain select * from myshop.user where email is null; 输出 可以看到用到索引 2、explain select * from myshop.user where email = 'test'
阅读全文
摘要:一、extra 二、extra实例 1、Using temporary 使用了临时表 EXPLAIN select * from myshop.ecs_users where user_id in ( select user_id from myshop.ecs_users where user_i
阅读全文
摘要:mysql 执行计划 SET optimizer_trace = "enabled=on";sql 语句 select trace FROM information_scheme.optimizer_trace; SET optimizer_trace=“enable=off”; 执行完会返回一个j
阅读全文