1.《高性能MYSQL》上的,没看懂这是什么优化,film_id应该是主键吧,求解释
2.顺便再问一个问题,这个sql说明使用索引,不过file_name并不是索引列,具体执行的时候是怎么执行,扫描索引列再匹配file_name,看着是这样子吧,这个sql能改写下达到相同的想过吗
PHPz2017-04-17 11:38:28
This rewriting is mainly based on the structural characteristics of the index. The original statement may cause cross-page when the field is long, and the limit statement itself is very inefficient. In the rewritten query, index coverage can be achieved by querying film_id alone.
I don’t understand what you mean.