如何减少mysql中查询的执行时间 [英] How can i reduce the execution time of query in mysql

查看:107
本文介绍了如何减少mysql中查询的执行时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



Hi all,

select sku,itemTitle,vendorID,UPC from portal_orders where purchaseDate<='2012-11-13' and sku not in (select sku from portal_orders where purchaseDate<='2012-12-13' and purchaseDate>='2012-11-13'  group by sku)and vendorID=$where2 limit 5





如何简化此查询..此查询需要更多时间来执行



How can i simplify this query.. this query takes more time to execute

推荐答案

where2 limit 5
where2 limit 5





如何简化此查询..此查询需要更多时间来执行



How can i simplify this query.. this query takes more time to execute


可能是对你有用:

http://www.databasejournal.com/features/mysql/article.php/1382791/Optimizing-MySQL-Queries-and-Indexes.htm [ ^ ]
Could be useful for you :
http://www.databasejournal.com/features/mysql/article.php/1382791/Optimizing-MySQL-Queries-and-Indexes.htm[^]


这篇关于如何减少mysql中查询的执行时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆