将文件拖动至此

SQL 上传 ( 0 ) x -

页面相关设置 点击以滚动到页面顶部
按 Ctrl+Enter 键执行查询 按 Enter 执行查询
递增排序
递减排序
命令:
调试 SQL
数量
运行顺序
用时
排序条件:
联合查询
不使用联合查询
崩溃 扩展 显示跟踪 隐藏跟踪 数量 用时
书签
刷新
添加
没有书签
添加书签
选项
恢复默认





崩溃 扩展 重新查询 编辑 解析 性能分析 书签 查询失败 数据库 : 查询时间 :

建议系统

可能存在的性能问题

Issue:
运行时间少于一天,性能调整建议可能不准确。
Recommendation:
要获得更加准确的数据,建议在运行分析器之前先让服务器运行至少一天
Justification:
运行时间只有 0 天 12 小时,44 分 21 秒
Used variable / formula:
Uptime
Test:
value < 86400
Issue:
long_query_time 当前设为 10 秒或更长,因此超过 10 秒的查询才被记为慢查询。
Recommendation:
建议根据您的环境将 long_query_time 调短。通常建议设为 1-5 秒。
Justification:
long_query_time 当前被设为 10 秒。
Used variable / formula:
long_query_time
Test:
value >= 10
Issue:
慢查询记录已禁用。
Recommendation:
请将 slow_query_log 设为 'ON' 来启用慢查询记录。这将有助于解决查询问题。
Justification:
slow_query_log 被设为 'OFF'
Used variable / formula:
slow_query_log
Test:
value == 'OFF'
Issue:
大量行被排序。
Recommendation:
大量行排序不是什么错误,但您应确保需要大量排序的查询在 ORDER BY 中使用索引字段,这将使排序加快。
Justification:
行排序率: 20.74 每秒
Used variable / formula:
Sort_rows / Uptime
Test:
value * 60 >= 1
Issue:
有太多的联合查询未使用索引。
Recommendation:
这意味着联合查询使用全表扫描。给联合条件所用的字段增加索引将极大提高查询速度。
Justification:
表联合率: 26.01 每分钟,该值应低于 1 每小时
Used variable / formula:
(Select_range_check + Select_scan + Select_full_join) / Uptime
Test:
value * 60 * 60 > 1
Issue:
读取第一个索引入口比例过高。
Recommendation:
这通常说明频繁的全索引扫描。全索引扫描虽然比全表扫描快,但在大表中仍然需要一定 CPU 周期,如果这些表有或有过大量 UPDATE 和 DELETE,运行 'OPTIMIZE TABLE' 可减少全索引扫描的次数以及提高速度。其它会减少全索引扫描的是重写查询。
Justification:
索引扫描率: 11.83 每分钟,该值应低于 1 每小时
Used variable / formula:
Handler_read_first / Uptime
Test:
value * 60 * 60 > 1
Issue:
从固定位置读取数据的比例过高。
Recommendation:
这说明很多查询需要结果排序且/或执行一次全表扫描,包括无索引的联合查询。请在合适的地方添加索引。
Justification:
固定位置读取率: 20.11 每秒,该值应低于 1 每小时
Used variable / formula:
Handler_read_rnd / Uptime
Test:
value * 60 * 60 > 1
Issue:
读取下一行的比例过高。
Recommendation:
这说明很多查询都需要全表扫描。请在合适的地方添加索引。
Justification:
下一行读取率: 1831.59 每秒,该值应低于 1 每小时
Used variable / formula:
Handler_read_rnd_next / Uptime
Test:
value * 60 * 60 > 1
Issue:
很多临时表被创建在磁盘上而非内存中。
Recommendation:
Increasing max_heap_table_size and tmp_table_size might help. However some temporary tables are always being written to disk, independent of the value of these variables. To eliminate these you will have to rewrite your queries to avoid those conditions (Within a temporary table: Presence of a BLOB or TEXT column or presence of a column bigger than 512 bytes) as mentioned in the MySQL Documentation
Justification:
临时表硬盘写入率: 2.53 每分钟,该值应低于 1 每小时
Used variable / formula:
Created_tmp_disk_tables / Uptime
Test:
value * 60 * 60 > 1
Issue:
MyISAM key buffer (index cache) % used is low.
Recommendation:
您可能需要减小 key_buffer_size 的大小,重新检查您的表是否删除了索引或检查查询期望使用的索引。
Justification:
最大 % MyISAM 索引缓存从未使用: 0%,该值应高于 95%
Used variable / formula:
Key_blocks_used * key_cache_block_size / key_buffer_size * 100
Test:
value < 95
Issue:
打开表的比例过高。
Recommendation:
打开表需要很耗时的磁盘 I/O。增加 table_open_cache 避免多次打开。
Justification:
已打开表的比率: 11.93 每小时,该值应低于 10 每小时
Used variable / formula:
Opened_tables / Uptime
Test:
value*60*60 > 10
Issue:
太多连接已中止。
Recommendation:
连接通常因为无法被授权而中止。这篇文章对您追踪来源可能有所帮助。
Justification:
8% 的连接已中止。该值应低于 1%
Used variable / formula:
Aborted_connects / Connections * 100
Test:
value > 1
Issue:
太多连接已中止。
Recommendation:
连接通常因为无法被授权而中止。这篇文章对您追踪来源可能有所帮助。
Justification:
已中止连接率为 20.57 每小时,该值应低于 1 每小时
Used variable / formula:
Aborted_connects / Uptime
Test:
value * 60 * 60 > 1
Issue:
查询缓存没有启用。
Recommendation:
若正确设置查询缓存将带来性能上的极大提升。您可以通过设置 query_cache_size 为 2 位数的 MB 值和设置 query_cache_type 为 'ON'。注意: 若您正在使用 memcached,请忽略此建议。
Justification:
query_cache_size 被设为 0 或 query_cache_type 被设为 'OFF'
Used variable / formula:
query_cache_size
Test:
value == 0 || query_cache_type == 'OFF' || query_cache_type == '0'