sql执行组件是灰色的_如何分析SQL执行计划图形组件

本文深入探讨SQL Server执行计划的图形组件,解析查询性能调优的关键点。通过监视和分析执行计划,可以理解查询的内部执行过程,识别性能瓶颈。文章强调了理解执行计划中的各个运算符、箭头表示的数据流动和成本,以及如何识别可能的索引建议,以优化查询性能。
摘要由CSDN通过智能技术生成

sql执行组件是灰色的

In the previous articles of this series, SQL Server Execution Plans overview and SQL Server Execution Plans types we went through the different stages that the submitted SQL Server query followed and how it processed by the SQL Server Relational Engine that generates the Execution Plan and the SQL Server Storage Engine that performs the requested data retrieval or modification operation. In addition, we described deeply the different types and formats of the SQL Server Execution Plans that can be used for queries performance troubleshooting purposes. In this article, we will discuss the graphical query plan components and how to analyze it.

在本系列的前几篇文章中, SQL Server执行计划概述SQL Server执行计划类型我们经历了提交SQL Server查询所遵循的不同阶段,以及由生成执行计划和SQLSQL Server关系引擎如何对其进行处理服务器存储引擎,执行请求的数据检索或修改操作。 此外,我们深入描述了可用于查询性能故障排除目的SQL Server执行计划的不同类型和格式。 在本文中,我们将讨论图形查询计划组件以及如何对其进行分析。

The SQL Execution Plan is used widely in tuning the performance of the queries by monitoring and troubleshooting how the query executed internally. To be able to take benefits of the SQL execution plan, we need to understand the different information provided by the SQL execution plan, clear at the surface or hidden between the operators. Recall that you should be grated SHOWPLAN permission in order to generate the Execution Plan. Members of the SYSADMIN, DBCREATOR or DB_OWNER will be able to generate the Execution Plans without the need for any extra permissions.

通过监视和解决内部查询的执行方式并对其进行故障排除,SQL执行计划被广泛用于调整查询的性能。 为了能够利用SQL执行计划,我们需要了解SQL执行计划提供的不同信息,这些信息在表面清晰可见,或者在操作员之间隐藏。 回想一下,您应该被授予SHOWPLAN权限才能生成执行计划。 SYSADMIN,DBCREATOR或DB_OWNER的成员将能够生成执行计划,而无需任何其他权限。

Let us start with a simple SQL Execution Plan. The below SQL Execution Plan is an Actual Plan generated after executing a simple SELECT statement. You may ask, how can I guess if it is an Actual Execution Plan or an Estimated Execution Plan. The answer is the Results tab that can be shown in the top of the figure, indicating that the query was executed before generating the Plan. If this part is removed from the plan, nothing can tell us from the first view what is the type of this graphical execution plan.

让我们从一个简单SQL执行计划开始。 下面SQL执行计划是在执行简单的SELECT语句后生成的实际计划。 您可能会问,我怎么能猜到它是实际执行计划还是估计执行计划。 答案是“结果”选项卡,该选项卡可以显示在图的顶部,指示该查询是在生成计划之前执行的。 如果将这部分从计划中删除,则从第一视图中什么也无法告诉我们该图形执行计划的类型。

The upper part of the SQL execution plan shows the cost of this query relative to the overall batch cost, in the case of generating the execution plan for multiple queries in the same session, as shown below:

在为同一会话中的多个查询生成执行计划的情况下,SQL执行计划的上部显示此查询相对于总批处理成本的查询成本,如下所示:

The statement of the submitted query will be also displayed at the top of the SQL execution plan. For long queries, as much of the query statement that can fit into the window will be displayed. You can get

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值