慢查询日志分析器 [英] slow query log analyzers

查看:169
本文介绍了慢查询日志分析器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么样的工具可以读取&解释缓慢的查询和缺少索引?



我知道MySQL查询分析器,你能建议其他工具更简单的配置和维护(开源和商业) / p>

数据库环境:MySQL,H2

解决方案

的H2数据库的任何图形工具,但有一个命令行工具来分析日志文件: http ://h2database.com/html/performance.html#database_profiling - 这将得到SQL语句的列表,最长的在顶部(最长的意思,一个具有最高的总合并时间) 。您还可以看到每个语句运行的次数和结果行的总数。一旦你知道这一点,运行分析解释选择...找出顶部查询使用的索引,加上他们从源表中读取的行数。


What kind of tools are available to read & interpret slow queries and missing indexes?

I am aware of MySQL Query Analyzer, can you suggest other tools which are simpler to configure and maintain (both open source and commercial)

Database environment: MySQL, H2

解决方案

I don't know of any graphical tools for the H2 database, but there is a command line tool to analyze the log file: http://h2database.com/html/performance.html#database_profiling - this will get you the list of SQL statements, the one that took the longest on top (the longest meaning the one with the highest total combined time). You also see the number of times each statement was run, and the total number of result rows. Once you know this, run "analyze explain select..." to find out the index the top queries use, plus the number of rows they read from the source tables.

这篇关于慢查询日志分析器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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