老师讲的不错,都是干货,下面是我的总结,大家可以看看:http://qixingjun.tech/2017/03/10/mysql-optimization/
2017-03-12
这样的sql
select film_id,description FROM sakila.film WHERE film_id>600 and film_id<=605 order by film_id limit 1,5
那个limit 1,5 不是有点重复的意思吗?
select film_id,description FROM sakila.film WHERE film_id>600 and film_id<=605 order by film_id limit 1,5
那个limit 1,5 不是有点重复的意思吗?
2017-03-11
select
a.TABLE_SCHEMA AS '数据名',
a.TABLE_NAME AS '表名',
a.INDEX_NAME AS '索引1',
b.INDEX_NAME AS '索引2',
a.COLUMN_NAME as '重复列名'
from STATISTICS a JOIN STATISTICS b ON
a.TABLE_SCHEMA = b.TABLE_SCHEMA
AND a.TABLE_NAME = b.TABLE_NAME
AND a.SEQ_IN_INDEX = b.SEQ_IN_INDEX
AND a.COLUMN_NAME = b.COLUMN_NAME
a.TABLE_SCHEMA AS '数据名',
a.TABLE_NAME AS '表名',
a.INDEX_NAME AS '索引1',
b.INDEX_NAME AS '索引2',
a.COLUMN_NAME as '重复列名'
from STATISTICS a JOIN STATISTICS b ON
a.TABLE_SCHEMA = b.TABLE_SCHEMA
AND a.TABLE_NAME = b.TABLE_NAME
AND a.SEQ_IN_INDEX = b.SEQ_IN_INDEX
AND a.COLUMN_NAME = b.COLUMN_NAME
2017-03-06