摘要:
问题: create table A ( id varchar(64) primary key, ver int, ... ) 我的表有几个很长的字段varchar(3000) 在id、ver上有联合索引 10000条数据 为什么select id from A order by id特别慢,而se 阅读全文
摘要:
假设某个表有一个联合索引(c1,c2,c3,c4)一下——只能使用该联合索引的c1,c2,c3部分 A where c1=x and c2=x and c4>x and c3=xB where c1=x and c2=x and c4=x order by c3C where c1=x and c4 阅读全文
摘要:
1、首先查看是否开启profiling功能 SHOW VARIABLES LIKE '%pro%'; 或者 SELECT @@profiling; 2、开启profiling SET profiling=1; 3、执行sql语句 例如: SELECT table_schema AS 'Db Name 阅读全文