azure mysql 测试_性能建议 - Azure Database for MySQL | Microsoft Docs

Azure Database for MySQL 提供性能建议功能,通过分析数据库以创建提高性能的定制建议。该功能依赖于查询存储,分析工作负载以识别潜在的索引优化和查询优化。建议在非高峰期执行分析,并在实施建议后测试性能。建议包括创建索引和查询优化,需要具备‘所有者’或‘参与者’权限才能运行分析。应用建议后,应监测性能以评估影响。
摘要由CSDN通过智能技术生成

您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

Azure Database for MySQL 中的性能建议Performance Recommendations in Azure Database for MySQL

6/3/2020

本文内容

适用于: Azure Database for MySQL 5.7、8.0Applies to: Azure Database for MySQL 5.7, 8.0

性能建议功能会通过分析数据库来创建自定义的建议,以提高性能。The Performance Recommendations feature analyzes your databases to create customized suggestions for improved performance. 为了生成建议,分析将查看各种数据库特征(包括架构)。To produce the recommendations, the analysis looks at various database characteristics including schema. 启用服务器上的查询存储即可充分利用性能建议功能。Enable Query Store on your server to fully utilize the Performance Recommendations feature. 如果性能架构为 OFF,则打开查询存储会启用 performance_schema 以及此功能所需的一部分性能架构检测。If performance schema is OFF, turning on Query Store enables performance_schema and a subset of performance schema instruments required for the feature. 实施任何性能建议后,应测试性能以评估这些更改的影响。After implementing any performance recommendation, you should test performance to evaluate the impact of those changes.

权限Permissions

使用性能建议功能运行分析所需的“所有者”或“参与者”权限。Owner or Contributor permissions required to run analysis using the Performance Recommendations feature.

性能建议Performance recommendations

性能建议功能跨服务器分析工作负载以标识可能会提高性能的索引。The Performance Recommendations feature analyzes workloads across your server to identify indexes with the potential to improve performance.

从 MySQL 服务器的 Azure 门户页菜单栏的“智能性能”部分打开 性能建议 。Open Performance Recommendations from the Intelligent Performance section of the menu bar on the Azure portal page for your MySQL server.

692d609ab5aba22ac1537c087709d07f.png

选择“分析”并选择数据库就会开始分析。Select Analyze and choose a database, which will begin the analysis. 分析可能需要几分钟的时间才能完成,具体取决于工作负载。Depending on your workload, the analysis may take several minutes to complete. 分析完成后,门户中将出现通知。Once the analysis is done, there will be a notification in the portal. 分析会执行数据库的深层检查。Analysis performs a deep examination of your database. 建议在非高峰期执行分析。We recommend you perform analysis during off-peak periods.

“建议”窗口会显示找到的建议的列表,以及生成该建议的相关查询 ID。The Recommendations window will show a list of recommendations if any were found and the related query ID that generated this recommendation. 有了查询 ID,就可以使用 mysql.query_store 视图来详细了解查询。With the query ID, you can use the mysql.query_store view to learn more about the query.

382f8d9d4b212d2d1a5a52882cdc72e4.png

不会自动应用建议。Recommendations are not automatically applied. 若要应用建议,请复制查询文本并从所选的客户端中运行。To apply the recommendation, copy the query text and run it from your client of choice. 记住通过测试和监视来评估建议。Remember to test and monitor to evaluate the recommendation.

建议类型Recommendation types

索引建议Index recommendations

“创建索引”建议建议使用新索引来加快工作负载中最常运行或最耗时的查询。Create Index recommendations suggest new indexes to speed up the most frequently run or time-consuming queries in the workload. 此建议类型需要启用查询存储。This recommendation type requires Query Store to be enabled. 查询存储收集查询信息并提供详细的查询运行时和频率统计信息,供分析用来提出建议。Query Store collects query information and provides the detailed query runtime and frequency statistics that the analysis uses to make the recommendation.

查询建议Query recommendations

查询建议建议对工作负载中的查询进行优化和重写。Query recommendations suggest optimizations and rewrites for queries in the workload. 通过识别 MySQL 查询反模式并按句法修复它们,可以改进耗时查询的性能。By identifying MySQL query anti-patterns and fixing them syntactically, the performance of time-consuming queries can be improved. 此建议类型需要启用“查询存储”。This recommendation type requires Query Store to be enabled. 查询存储收集查询信息并提供详细的查询运行时和频率统计信息,供分析用来提出建议。Query Store collects query information and provides the detailed query runtime and frequency statistics that the analysis uses to make the recommendation.

后续步骤Next steps

详细了解如何在 Azure Database for MySQL 中进行监视和优化。Learn more about monitoring and tuning in Azure Database for MySQL.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值