有没有什么软件可以帮助MYSQL优化?
我的本地 MYSQL 数据库中有许多非常长且相当复杂的存储过程。我整天通过这些存储过程以很高的频率重复查询数据库。
时间对我来说非常重要。查询时间减少一毫秒就相当于节省了几个小时,因为我的例程是迭代的。
由于我的数据库如此复杂,我很难用“更改它并查看”的方法手动优化所有内容。
是否有任何程序(适用于 Windows 7)可以帮助我找到瓶颈?我需要索引相关的优化和服务器变量优化。
I have a number of very long and fairly complex stored procedures in my local MYSQL database. I query the database through these stored procedures repeatedly at a high rate all day long.
Time is very much of the essence to me. A millisecond decrease in query time amounts to hours saved because my routines are iterative.
Since my database is so involved, it is difficult for me to optimize everything manually with a "change it and see" approach.
Are there any programs (for Windows 7) that might help me find the bottlenecks? I need both index-related optimization and server variable optimization.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
查看 dbForge Studio 中的查询分析器工具。它可以帮助您优化查询。
Have a look at Query Profiler tool in dbForge Studio. It can help you to optimize queries.
MySQL 包含自己的调试查询和查询计划的方法,其中最主要的是
EXPLAIN
命令。对我来说,90%的MySQL优化都在某种程度上涉及到使用它。它消除了优化中的反复试验,因为它实际上向您展示了 MySQL 实际正在做什么来解决您的查询。您可以使用任何 MySQL 客户端(甚至是我使用过的命令行 MySQL 客户端)来运行 EXPLAIN 查询。 phpMyAdmin 是一个流行的 MySQL 客户端,可以通过网络访问并尝试进行这种排序事情很简单,包括一个简单的“解释”链接,用于您运行的任何查询。
我之前没有使用过基于 Windows 的 MySQL 客户端,但是有一个 从中选择的好选择。
MySQL includes its own methods for debugging queries and query plans, the chief among these is the
EXPLAIN
command. For me, 90% of MySQL optimisation involves using this to some extent. It takes the trial-and-error out of optimisation because it actually shows you what MySQL is actually doing to solve your query.You can use any MySQL client (even the command-line MySQL client, which I use a bit) to run
EXPLAIN
queries. phpMyAdmin is a popular MySQL client which is accessed over the web and tries to make this sort of thing easy, including an easy "EXPLAIN" link for any query you run.I haven't used Windows-based MySQL clients before but there are a good selection of them to be chosen from.