摘要:
查看表的索引 show create table 表名; show index from 表名; show keys from表名; 添加索引 alter table 表名 add index 索引名字 (索引字段); alter table goods add index price (shop_ 阅读全文
摘要:
show variables like '%profiling%'; 查看状态 查看时间去哪了``` set profiling=1;// 打开 show profiles; 查看执行过的sql 语句 show profile for query 2; 找到第二条为id为2的sql生成查询计划 分析 阅读全文
摘要:
1、查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断 select * from people where peopleId in (select peopleId from people group by peopleId having count(peopleId) > 阅读全文