性能优化
摘要:查询类性能优化 (1)尽量用上索引 (2)保证只会有一条数据返回时后面加上limit 1(减少检索数量) (3)尽量使用BETWIN代替<> (4)and的优先级高于or的优先级 (5)or条件少时用union(合并)代替,因为or不会使用索引,or条件多时可以使用in代替(性能比or好) (6)l
阅读全文
posted @ 2018-07-07 11:23
posted @ 2018-07-07 11:23
posted @ 2018-07-07 11:09
posted @ 2018-06-24 11:35