mysql--优化

1.深度分页查询优化

 优化前:select username,userpassword from  user limit 100005,3;

 优化后:select username,userpassword from  user  where id > 100004 limit 0,3;

  原理:用到了主键索引,提高了查询效率

怕什么真理无穷 进一寸有一寸的欢喜
原文地址:https://www.cnblogs.com/ccbk/p/14923073.html