Back

Mysql优化

mysql中min和max查询优化

max()函数需扫描where条件过滤后的所有行

慎用max()函数,特别是频繁执行的sql,若需用到可转化为order by id desc limit 1

Licensed under CC BY-NC-SA 4.0
最后更新于 Nov 11, 2019 13:56 +0800
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy