Showplan 逻辑运算符和物理运算符参考Showplan Logical and Physical Operators Reference

适用对象:是SQL Server 是Azure SQL 数据库 否Azure Synapse Analytics (SQL DW) 否并行数据仓库APPLIES TO: yesSQL Server yesAzure SQL Database noAzure Synapse Analytics (SQL DW) noParallel Data Warehouse

运算符说明了 SQL ServerSQL Server 如何执行查询或数据操作语言 (DML) 语句。Operators describe how SQL ServerSQL Server executes a query or a Data Manipulation Language (DML) statement. 查询优化器使用运算符生成查询计划,以创建在查询中指定的结果或执行在 DML 语句中指定的操作。The query optimizer uses operators to build a query plan to create the result specified in the query, or to perform the operation specified in the DML statement. 查询计划是由物理运算符组成的一个树。The query plan is a tree consisting of physical operators. 您可以使用 SET SHOWPLAN 语句、 SQL Server Management StudioSQL Server Management Studio中的图形执行计划选项或 SQL Server Profiler Showplan 事件类来查看查询计划。You can view the query plan by using the SET SHOWPLAN statements, the graphical execution plan options in SQL Server Management StudioSQL Server Management Studio, or the SQL Server Profiler Showplan event classes.

运算符分为逻辑运算符和物理运算符。Operators are classified as logical and physical operators.

逻辑运算符Logical Operators
逻辑运算符描述了用于处理语句的关系代数操作。Logical operators describe the relational algebraic operation used to process a statement. 换言之,逻辑运算符从概念上描述了需要执行哪些操作。In other words, logical operators describe conceptually what operation needs to be performed.

物理运算符Physical Operators
物理运算符实施由逻辑运算符描述的操作。Physical operators implement the operation described by logical operators. 每个物理运算符都是一个执行某项操作的对象或例程。Each physical operator is an object or routine that performs an operation. 例如,某些物理运算符可访问表、索引或视图中的列或行。For example, some physical operators access columns or rows from a table, index or view. 其他物理运算符执行其他操作,如计算、聚合、数据完整性检查或联接。Other physical operators perform other operations such as calculations, aggregations, data integrity checks or joins. 物理运算符具有与其关联的开销。Physical operators have costs associated with them.

物理运算符初始化、收集数据,然后关闭。The physical operators initialize, collect data, and close. 具体来讲,物理运算符可以响应下列三种方法调用:Specifically, the physical operator can answer the following three method calls:

  • Init() :Init() 方法使物理运算符初始化自身并设置所有需要的数据结构 。Init(): The Init() method causes a physical operator to initialize itself and set up any required data structures. 尽管一个物理运算符通常只接收一次 Init() 调用,但也可以接收许多次调用。The physical operator may receive many Init() calls, though typically a physical operator receives only one.

  • GetNext() :GetNext() 方法使物理运算符获得数据的第一行或后续行 。GetNext(): The GetNext() method causes a physical operator to get the first, or subsequent row of data. 物理运算符可以不接收 GetNext() 调用,也可以接收许多次调用。The physical operator may receive zero or many GetNext() calls.

  • Close() :Close() 方法使物理运算符执行某些清除操作,然后关闭 。Close(): The Close() method causes a physical operator to perform some clean-up operations and shut itself down. 一个物理运算符只接收一个 Close() 调用。A physical operator only receives one Close() call.

GetNext() 方法返回一个数据行,它的调用次数作为 ActualRows 显示在使用 SET STATISTICS PROFILE ON 或 SET STATISTICS XML ON 生成的显示计划输出中。The GetNext() method returns one row of data, and the number of times it is called appears as ActualRows in the Showplan output that is produced by using SET STATISTICS PROFILE ON or SET STATISTICS XML ON. 有关这些 SET 选项的详细信息,请参阅 SET STATISTICS PROFILE (Transact-SQL)SET STATISTICS XML (Transact-SQL)For more information about these SET options, see SET STATISTICS PROFILE (Transact-SQL) and SET STATISTICS XML (Transact-SQL).

显示计划输出中显示的 ActualRebindsActualRewinds 计数是指 Init() 方法被调用的次数。The ActualRebinds and ActualRewinds counts that appear in Showplan output refer to the number of times that the Init() method is called. 除非运算符位于循环联接的内侧,否则 ActualRebinds 等于一, ActualRewinds 等于零。Unless an operator is on the inner side of a loop join, ActualRebinds equals one and ActualRewinds equals zero. 如果运算符位于循环联接的内侧,那么重新绑定次数和重绕次数之和应等于联接外侧所处理的行数。If an operator is on the inner side of a loop join, the sum of the number of rebinds and rewinds should equal the number of rows processed on the outer side of the join. 重新绑定意味着联接的一个或多个相关参数发生更改后,必须重新计算联接的内侧。A rebind means that one or more of the correlated parameters of the join changed and the inner side must be reevaluated. 重绕意味着任何相关参数都没有发生更改,可以重用之前的内侧结果集。A rewind means that none of the correlated parameters changed and the prior inner result set may be reused.

ActualRebindsActualRewinds 显示在使用 SET STATISTICS XML ON 生成的 XML 显示计划输出中。ActualRebinds and ActualRewinds are present in XML Showplan output produced by using SET STATISTICS XML ON. 它们只为 Nonclustered Index SpoolRemote QueryRow Count SpoolSortTable SpoolTable-valued Function 运算符填充。They are only populated for the Nonclustered Index Spool, Remote Query, Row Count Spool, Sort, Table Spool, and Table-valued Function operators. 如果ActualRebinds 属性设置为 TRUE,也会为 ActualRebindsActualRebinds 属性设置为 TRUE,也会为 ActualRebindsActualRewindsActualRebinds and ActualRewinds may also be populated for the Assert and Filter operators when the StartupExpression attribute is set to TRUE.

ActualRebindsActualRewinds 显示在 XML 显示计划中时,它们可以与 EstimateRebindsEstimateRewinds相比较。When ActualRebinds and ActualRewinds are present in an XML Showplan, they are comparable to EstimateRebinds and EstimateRewinds. 如果它们没有显示,则预计的行数 (EstimateRows) 可以与实际的行数 (ActualRows) 相比较。When they are absent, the estimated number of rows (EstimateRows) is comparable to the actual number of rows (ActualRows). 注意,如果它们没有显示,实际的图形显示计划输出中将实际的重新绑定次数和重绕次数均显示为零。Note that actual graphical Showplan output displays zeros for the actual rebinds and actual rewinds when they are absent.

只有在显示计划输出是使用 SET STATISTICS XML ON 生成的情况下,相关计数器 ActualEndOfScans才可用。A related counter, ActualEndOfScans, is available only when Showplan output is produced by using SET STATISTICS XML ON. 只要物理运算符到达其数据流的结尾,此计数器就增加一。Whenever a physical operator reaches the end of its data stream, this counter is incremented by one. 物理运算符可以到达其数据流结尾零次、一次或多次。A physical operator can reach the end of its data stream zero, one, or multiple times. 对于重新绑定次数和重绕次数,只有在运算符位于循环联接的内侧时,扫描结束的次数才可以多于一次。As with rebinds and rewinds, the number of end of scans can be more than one only if the operator is on the inner side of a loop join. 扫描结束的次数应少于或等于重新绑定次数与重绕次数之和。The number of end of scans should be less than or equal to the sum of the number of rebinds and rewinds.

映射物理运算符和逻辑运算符Mapping Physical and Logical Operators

查询优化器可以创建一个查询计划,该计划由逻辑运算符组成的树表示。The query optimizer creates a query plan as a tree consisting of logical operators. 查询优化器创建计划后,将为每个逻辑运算符选择最有效的物理运算符。After the query optimizer creates the plan, the query optimizer chooses the most efficient physical operator for each logical operator. 查询优化器使用基于开销的方法确定将实施逻辑运算符的物理运算符。The query optimizer uses a cost-based approach to determine which physical operator will implement a logical operator.

通常,一个逻辑运算符可由多个物理运算符实施。Usually, a logical operation can be implemented by multiple physical operators. 但是在少数情况下,一个物理运算符也可以实施多个逻辑操作符。However, in rare cases, a physical operator can implement multiple logical operations as well.

操作说明Operator Descriptions

本节介绍了各个逻辑运算符和物理运算符。This section contains descriptions of the logical and physical operators.

图形执行计划图标Graphical Execution Plan Icon Showplan 运算符Showplan Operator 描述Description
自适应联接运算符图标Adaptive Join operator icon 自适应联接Adaptive Join 通过“自适应联接”运算符,在扫描第一个输入后可延迟选择哈希联接或嵌套循环联接方法 。The Adaptive Join operator enables the choice of a hash join or nested loops join method to be deferred until the after the first input has been scanned. “自适应联接”运算符是一个物理运算符 。The Adaptive Join operator is a physical operator. 有关详细信息,请参阅理解自适应联接For more information, see Understanding Adaptive joins.
NoneNone AggregateAggregate Aggregate 运算符计算包含 MIN、MAX、SUM、COUNT 或 AVG 的表达式。The Aggregate operator calculates an expression containing MIN, MAX, SUM, COUNT or AVG. Aggregate 既是一个逻辑运算符,也是一个物理运算符。The Aggregate operator can be a logical operator or a physical operator.
Arithmetic Expression 运算符图标Arithmetic expression operator icon Arithmetic ExpressionArithmetic Expression Arithmetic Expression 运算符根据行中的现有值计算新值。The Arithmetic Expression operator computes a new value from existing values in a row. 中未使用 算术表达式 SQL ServerSQL ServerArithmetic Expression is not used in SQL ServerSQL Server.
NoneNone Async ConcatAsync Concat Async Concat 运算符仅用于远程查询中(分布式查询) 。The Async Concat operator is used only in remote queries (distributed queries). 它有 n 个子节点和一个父节点。It has n children and one parent node. 通常,某些子节点是参与分布式查询的远程计算机。Usually, some of the children are remote computers that participate in a distributed query. Asnyc Concat 同时向所有子节点发出 open() 调用,然后将位图应用于每个子节点 。Async Concat issues open() calls to all of the children simultaneously and then applies a bitmap to each child. 对于为 1 的每个位, Async Concat 按需向父节点发送输出行。For each bit that is a 1, Async Concat sends the output rows to the parent node on demand.
Assert 运算符图标Assert operator icon ActualRebindsAssert Assert 运算符用于验证条件。The Assert operator verifies a condition. 例如,验证引用完整性或确保标量子查询返回一行。For example, it validates referential integrity or ensures that a scalar subquery returns one row. 对于每个输入行, Assert 运算符都要计算执行计划的 Argument 列中的表达式。For each input row, the Assert operator evaluates the expression in the Argument column of the execution plan. 如果此表达式的值为 NULL,则通过 Assert 运算符传递该行,并且查询执行将继续。If this expression evaluates to NULL, the row is passed through the Assert operator and the query execution continues. 如果此表达式的值非 Null,则将产生相应的错误。If this expression evaluates to a nonnull value, the appropriate error will be raised. Assert 运算符是一个物理运算符。The Assert operator is a physical operator.
Assign 语言元素图标Assign language element icon AssignAssign Assign 运算符将表达式的值或常量分配给变量。The Assign operator assigns the value of an expression or a constant to a variable. Assign 是一个语言元素。Assign is a language element.
Bitmap 运算符图标Bitmap operator icon Bitmap CreateBitmap Create Bitmap Create 运算符出现在创建位图的显示计划输出中。The Bitmap Create operator appears in the Showplan output where bitmaps are built. Bitmap Create 是一个逻辑运算符。Bitmap Create is a logical operator.
Bitmap 运算符图标Bitmap operator icon BitmapBitmap SQL ServerSQL Server 使用 Bitmap 运算符来实现并行查询计划中的位图筛选。uses the Bitmap operator to implement bitmap filtering in parallel query plans. 在将行传递给另一个运算符(如 Parallelism 运算符)之前,通过消除无法生成任何联接记录的键值的行,位图筛选可提高查询的执行速度。Bitmap filtering speeds up query execution by eliminating rows with key values that cannot produce any join records before passing rows through another operator such as the Parallelism operator. 位图筛选器使用运算符树某部分的表中一组值的简洁表示形式来筛选位于该树另一部分的第二张表中的行。A bitmap filter uses a compact representation of a set of values from a table in one part of the operator tree to filter rows from a second table in another part of the tree. 通过在查询中预先删除不必要的行,后续运算符将处理较少的行,从而提高查询的整体性能。By removing unnecessary rows early in the query, subsequent operators have fewer rows to work with, and the overall performance of the query improves. 优化器将确定位图的选择性何时可满足使用条件以及在哪些运算符上应用筛选器。The optimizer determines when a bitmap is selective enough to be useful and in which operators to apply the filter. Bitmap 是一个物理运算符。Bitmap is a physical operator.
Bookmark Lookup 运算符图标Bookmark lookup operator icon Bookmark LookupBookmark Lookup Bookmark Lookup 运算符使用书签(行 ID 或聚集键)在表或聚集索引中查找相应的行。The Bookmark Lookup operator uses a bookmark (row ID or clustering key) to look up the corresponding row in the table or clustered index. Argument 列包含书签标签,用于在表或聚集索引内查找行。The Argument column contains the bookmark label used to look up the row in the table or clustered index. Argument 列还包含要查找的行所在的表或聚集索引的名称。The Argument column also contains the name of the table or clustered index in which the row is looked up. 如果 Argument 列中出现 WITH PREFETCH 子句,则表示查询处理器已决定在表或聚集索引中查找书签时将使用异步预提取(预读)作为最佳选择。If the WITH PREFETCH clause appears in the Argument column, the query processor has determined that it is optimal to use asynchronous prefetching (read-ahead) when looking up bookmarks in the table or clustered index.

SQL Server 2005 (9.x)SQL Server 2005 (9.x) 开始,便不再使用 Bookmark Lookup 。Starting with SQL Server 2005 (9.x)SQL Server 2005 (9.x), Bookmark Lookup is not used. 而由 Key Lookup 和 RID Lookup 提供书签查找功能 。Instead, Key Lookup and RID Lookup provide bookmark lookup functionality.
NoneNone Branch RepartitionBranch Repartition 在并行查询计划中,有时存在迭代器的概念性区域。In a parallel query plan, sometimes there are conceptual regions of iterators. 此类区域中的所有迭代器都可通过并行线程执行。All of the iterators within such a region can be executed by parallel threads. 这些区域本身必须串行执行。The regions themselves must be executed serially. 单个区域内的某些 Parallelism 迭代器称为 Branch RepartitionSome of the Parallelism iterators within an individual region are called Branch Repartition. 两个这样的区域边界上的 Parallelism 迭代器称为 Segment RepartitionThe Parallelism iterator at the boundary of two such regions is called Segment Repartition. Branch RepartitionSegment Repartition 是逻辑运算符。Branch Repartition and Segment Repartition are logical operators.
NoneNone BroadcastBroadcast Broadcast 有一个子节点和 n 个父节点。Broadcast has one child node and n parent nodes. Broadcast 根据使用者的请求将其输入行发送给多个使用者。Broadcast sends its input rows to multiple consumers on demand. 每个使用者都将获得所有行。Each consumer gets all of the rows. 例如,如果所有使用者都是哈希联接的生成端,则将生成 n 份哈希表。For example, if all of the consumers are build sides of a hash join, then n copies of the hash tables will be built.
Build Hash 运算符图标Build hash operator icon Build HashBuild Hash 指示为 xVelocity 内存优化的列存储索引生成批处理哈希表。Indicates the build of a batch hash table for an xVelocity memory optimized columnstore index.
NoneNone CacheCache Cache 是一个专门的 Spool 运算符。Cache is a specialized version of the Spool operator. 它仅存储一行数据。It stores only one row of data. Cache 是一个逻辑运算符。Cache is a logical operator. 中不使用 Cache SQL ServerSQL ServerCache is not used in SQL ServerSQL Server.
Clustered Index Delete 运算符图标Clustered index delete operator icon Clustered Index DeleteClustered Index Delete Clustered Index Delete 运算符从查询执行计划的 Argument 列中指定的聚集索引中删除行。The Clustered Index Delete operator deletes rows from the clustered index specified in the Argument column of the query execution plan. 如果 Argument 列中存在 WHERE:() 谓词,则仅删除满足该谓词的行。Clustered Index Delete 是一个物理运算符。If a WHERE:() predicate is present in the Argument column, then only those rows that satisfy the predicate are deleted.Clustered Index Delete is a physical operator.
Clustered Index Insert 运算符图标Clustered index insert operator icon Clustered Index InsertClustered Index Insert Clustered Index Insert Showplan 运算符可将行从其输入插入到 Argument 列中所指定的聚集索引中。The Clustered Index Insert Showplan operator inserts rows from its input into the clustered index specified in the Argument column. Argument 列还包含一个 SET:() 谓词,用于指示为每一列设置的值。The Argument column also contains a SET:() predicate, which indicates the value to which each column is set. 如果 Clustered Index Insert 的插入值没有子项,则插入的行来自 Insert 运算符本身。Clustered Index Insert 是一个物理运算符。If Clustered Index Insert has no children for insert values, the row inserted is taken from the Insert operator itself.Clustered Index Insert is a physical operator.
Clustered Index Merge 运算符图标Clustered index merge operator Clustered Index MergeClustered Index Merge Clustered Index Merge 运算符可将合并数据流应用于聚集索引。The Clustered Index Merge operator applies a merge data stream to a clustered index. 该运算符可在其 Argument 列中所指定的聚集索引中删除、更新或插入行。The operator deletes, updates, or inserts rows from the clustered index specified in the Argument column of the operator. 执行的实际操作取决于该运算符的 Argument 列中指定的 ACTION 列的运行时值。The actual operation performed depends on the runtime value of the ACTION column specified in the Argument column of the operator. Clustered Index Merge 是一个物理运算符。Clustered Index Merge is a physical operator.
Clustered Index Scan 运算符图标Clustered index scan operator icon Clustered Index ScanClustered Index Scan Clustered Index Scan 运算符会扫描查询执行计划的 Argument 列中指定的聚集索引。The Clustered Index Scan operator scans the clustered index specified in the Argument column of the query execution plan. 存在可选 WHERE:() 谓词时,则只返回满足该谓词的那些行。When an optional WHERE:() predicate is present, only those rows that satisfy the predicate are returned. 如果 Argument 列包含 ORDERED 子句,则表示查询处理器已请求按聚集索引排列行的顺序返回行输出。If the Argument column contains the ORDERED clause, the query processor has requested that the output of the rows be returned in the order in which the clustered index has sorted it. 如果没有 ORDERED 子句,存储引擎将以最佳方式扫描索引,而无需对输出进行排序。If the ORDERED clause is not present, the storage engine scans the index in the optimal way, without necessarily sorting the output. Clustered Index Scan 既是一个逻辑运算符,也是一个物理运算符。Clustered Index Scan is a logical and physical operator.
Clustered Index Seek 运算符图标Clustered index seek operator icon Clustered Index SeekClustered Index Seek Clustered Index Seek 运算符可以利用索引的查找功能从聚集索引中检索行。The Clustered Index Seek operator uses the seeking ability of indexes to retrieve rows from a clustered index. Argument 列包含所使用的聚集索引名称和 SEEK:() 谓词。The Argument column contains the name of the clustered index being used and the SEEK:() predicate. 存储引擎仅使用索引来处理满足此 SEEK:() 谓词的行。The storage engine uses the index to process only those rows that satisfy this SEEK:() predicate. 它还包括 WHERE:() 谓词,其中存储引擎对满足 SEEK:() 谓词的所有行进行计算,但此操作是可选的,并且不使用索引来完成此过程。It can also include a WHERE:() predicate where the storage engine evaluates against all rows that satisfy the SEEK:() predicate, but this is optional and does not use indexes to complete this process.

如果 Argument 列包含 ORDERED 子句,则表示查询处理器已决定必须按聚集索引排序行的顺序返回行。If the Argument column contains the ORDERED clause, the query processor has determined that the rows must be returned in the order in which the clustered index has sorted them. 如果没有 ORDERED 子句,存储引擎将以最佳方式搜索索引,而不对输出进行必要的排序。If the ORDERED clause is not present, the storage engine searches the index in the optimal way, without necessarily sorting the output. 若允许输出保持顺序,则效率可能比生成非排序输出的效率低。Allowing the output to retain its ordering can be less efficient than producing nonsorted output. 出现关键字 LOOKUP 时,将执行书签查找。When the keyword LOOKUP appears, then a bookmark lookup is being performed. SQL Server 2008SQL Server 2008 和更高版本中, Key Lookup 运算符提供书签查找功能。In SQL Server 2008SQL Server 2008 and later versions, the Key Lookup operator provides bookmark lookup functionality. Clustered Index Seek 既是一个逻辑运算符,也是一个物理运算符。Clustered Index Seek is a logical and physical operator.
Clustered Index Update 运算符图标Clustered index update operator icon Clustered Index UpdateClustered Index Update Clustered Index Update 运算符更新 Argument 列中指定的聚集索引中的输入行。如果存在 WHERE:() 谓词,则只更新那些满足此谓词的行。The Clustered Index Update operator updates input rows in the clustered index specified in the Argument column.If a WHERE:() predicate is present, only those rows that satisfy this predicate are updated. 如果存在 SET:() 谓词,则将每个更新的列设置为该值。If a SET:() predicate is present, each updated column is set to this value. 如果存在 DEFINE:() 谓词,则列出此运算符定义的值。If a DEFINE:() predicate is present, the values that this operator defines are listed. 可以在 SET 子句中、该运算符内的其他位置和该查询内的其他位置引用这些值。These values may be referenced in the SET clause or elsewhere within this operator and elsewhere within this query. Clustered Index Update 既是一个逻辑运算符,也是一个物理运算符。Clustered Index Update is a logical and physical operator.
Collapse 运算符图标Collapse operator icon 折叠Collapse Collapse 运算符用于优化更新处理。The Collapse operator optimizes update processing. 执行更新时,可以将该更新操作拆分(使用 Split 运算符)成为删除和插入操作。When an update is performed, it can be split (using the Split operator) into a delete and an insert. Argument 列包含一个指定键列列表的 GROUP BY:() 子句。The Argument column contains a GROUP BY:() clause that specifies a list of key columns. 如果查询处理器遇到删除和插入相同键值的相邻行,则会用一个更有效的更新操作替换这些单独的操作。If the query processor encounters adjacent rows that delete and insert the same key values, it replaces these separate operations with a single more efficient update operation. Collapse 既是一个逻辑运算符,也是一个物理运算符。Collapse is a logical and physical operator.
Columnstore Index ScanColumnstore Index Scan Columnstore Index ScanColumnstore Index Scan Columnstore Index Scan 运算符会扫描查询执行计划的 Argument 列中指定的列存储索引。The Columnstore Index Scan operator scans the columnstore index specified in the Argument column of the query execution plan.
Compute Scalar 运算符图标Compute scalar operator icon Compute ScalarCompute Scalar Compute Scalar 运算符通过对表达式求值来生成计算标量值。The Compute Scalar operator evaluates an expression to produce a computed scalar value. 该值可以返回给用户、在查询中的其他位置引用或二者皆可。This may then be returned to the user, referenced elsewhere in the query, or both. 例如,在筛选谓词或联接谓词中就会出现二者皆可的情况。An example of both is in a filter predicate or join predicate. Compute Scalar 既是一个逻辑运算符,也是一个物理运算符。Compute Scalar is a logical and physical operator.

在 SET STATISTICS XML 生成的显示计划中出现的Compute Scalar 运算符可能不包含 RunTimeInformation 元素。Compute Scalar operators that appear in Showplans generated by SET STATISTICS XML might not contain the RunTimeInformation element. 在图形显示计划中,当已在 中选中“包括实际的执行计划” 选项时, “实际行” “实际重新绑定次数” “实际重绕次数” 可能不会出现在 “属性” SQL Server Management StudioSQL Server Management Studio窗口中。In graphical Showplans, Actual Rows, Actual Rebinds, and Actual Rewinds might be absent from the Properties window when the Include Actual Execution Plan option is selected in SQL Server Management StudioSQL Server Management Studio. 当出现这种情况时,意味着虽然编译过的查询计划中使用了这些运算符,但在运行时查询计划中,它们的作用是由其他运算符实现的。When this occurs, it means that although these operators were used in the compiled query plan, their work was performed by other operators in the run-time query plan. 另外,请注意,SET STATISTICS PROFILE 生成的显示计划输出中的执行数等于 SET STATISTICS XML 生成的显示计划中的重新绑定次数和重绕次数的总和。Also note that the number of executes in Showplan output generated by SET STATISTICS PROFILE is equivalent to the sum of rebinds and rewinds in Showplans generated by SET STATISTICS XML.
Concatenation 运算符图标Concatenation operator icon ConcatenationConcatenation Concatenation 运算符扫描多个输入,并返回每个扫描的行。The Concatenation operator scans multiple inputs, returning each row scanned. Concatenation 通常用于实现 Transact-SQLTransact-SQL UNION ALL 结构。Concatenation is typically used to implement the Transact-SQLTransact-SQL UNION ALL construct. Concatenation 物理运算符有两个或多个输入,有一个输出。The Concatenation physical operator has two or more inputs and one output. Concatenation 将行从第一个输入流复制到输出流,然后对其他输入流重复进行此操作。Concatenation copies rows from the first input stream to the output stream, then repeats this operation for each additional input stream. Concatenation 既是一个逻辑运算符,也是一个物理运算符。Concatenation is a logical and physical operator.
Constant Scan 运算符图标Constant scan operator icon Constant ScanConstant Scan Constant Scan 运算符可将一个或多个常量行引入到查询中。The Constant Scan operator introduces one or more constant rows into a query. Compute Scalar 运算符通常在 Constant Scan 之后使用,以将列添加到 Constant Scan 运算符生成的行中。A Compute Scalar operator is often used after a Constant Scan to add columns to a row produced by the Constant Scan operator.
Convert(数据库引擎)语言元素图标Convert (Database Engine) language element icon 转换Convert Convert 运算符将标量数据类型转换为另一种类型。The Convert operator converts one scalar data type to another. Convert 是一个语言元素。Convert is a language element.
NoneNone Cross JoinCross Join Cross Join 运算符将第一个(顶端)输入中的每一行与第二个(底端)输入中的每一行联接在一起。The Cross Join operator joins each row from the first (top) input with each row from the second (bottom) input. Cross Join 是一个逻辑运算符。Cross Join is a logical operator.
NoneNone 游标Cursor Cursor 逻辑运算符和物理运算符用于描述涉及游标操作的查询或更新的执行方式。The Cursor logical and physical operators are used to describe how a query or update involving cursor operations is executed. 其中物理运算符描述用于处理游标(如使用键集驱动游标)的物理实现算法。The physical operators describe the physical implementation algorithm used to process the cursor; for example, using a keyset-driven cursor. 游标执行过程的每一步都涉及物理运算符。Each step in the execution of a cursor involves a physical operator. 而逻辑运算符描述游标的属性,如游标是只读。The logical operators describe a property of the cursor, such as the cursor is read only.

逻辑运算符包括 Asynchronous、Optimistic、Primary、Read Only、Scroll Locks、Secondary 和 Synchronous。Logical operators include Asynchronous, Optimistic, Primary, Read Only, Scroll Locks, and Secondary and Synchronous.

物理运算符包括 Dynamic、Fetch Query、Keyset、Population Query、Refresh Query 和 Snapshot。Physical operators include Dynamic, Fetch Query, Keyset, Population Query, Refresh Query and Snapshot.
Cursor 通用游标运算符图标Cursor catchall cursor operator icon catchallcatchall 生成图形显示计划的逻辑找不到迭代器的合适图标时,将显示通用图标。The catchall icon is displayed when a suitable icon for the iterator cannot be found by the logic that produces graphical showplans. 通用图标不一定指示存在错误。The catchall icon does not necessarily indicate an error condition. 有三种通用图标:蓝色(用于迭代器)、橙色(用于游标)和绿色(用于 Transact-SQLTransact-SQL 语言元素)。There are three catchall icons: blue (for iterators), orange (for cursors), and green (for Transact-SQLTransact-SQL language elements).
Declare 语言元素图标Declare language element icon DeclareDeclare Declare 运算符用于分配查询计划中的局部变量 。The Declare operator allocates a local variable in the query plan. Declare 是一个语言元素。Declare is a language element.
Delete(数据库引擎)运算符图标Delete (Database Engine) operator icon 删除Delete Delete 运算符将从对象中删除满足 Argument 列内的可选谓词的行。The Delete operator deletes from an object rows that satisfy the optional predicate in the Argument column.
Delete Scan 运算符图标Delete scan operator icon Deleted ScanDeleted Scan Deleted Scan 运算符在触发器中扫描删除的表。The Deleted Scan operator scans the deleted table within a trigger.
NoneNone Distinct SortDistinct Sort Distinct Sort 逻辑运算符将对输入进行扫描,删除重复项并按 Argument 列的 DISTINCT ORDER BY:() 谓词中指定的列进行排序。The Distinct Sort logical operator scans the input, removing duplicates and sorting by the columns specified in the DISTINCT ORDER BY:() predicate of the Argument column. Distinct Sort 是一个逻辑运算符。Distinct Sort is a logical operator.
NoneNone DistinctDistinct Distinct 运算符可以从行集或值集中删除重复项。The Distinct operator removes duplicates from a rowset or from a collection of values. Distinct 是一个逻辑运算符。Distinct is a logical operator.
Distribute Streams 并行度运算符图标Distribute streams parallelism operator icon Distribute StreamsDistribute Streams Distribute Streams 运算符仅用于并行查询计划。The Distribute Streams operator is used only in parallel query plans. Distribute Streams 运算符接收记录的单个输入流,并生成多个输出流。The Distribute Streams operator takes a single input stream of records and produces multiple output streams. 记录的内容和格式不会改变。The record contents and format are not changed. 输入流中的每个记录都将在某个输出流中显示。Each record from the input stream appears in one of the output streams. 此运算符在输出流中自动保留输入记录的相对顺序。This operator automatically preserves the relative order of the input records in the output streams. 通常情况下,使用哈希操作确定特定输入记录所属的输出流。Usually, hashing is used to decide to which output stream a particular input record belongs.

如果将输出分区,那么 Argument 列会包含 PARTITION COLUMNS:() 谓词和分区依据列。If the output is partitioned, then the Argument column contains a PARTITION COLUMNS:() predicate and the partitioning columns. Distribute Streams 是一个逻辑运算符。Distribute Streams is a logical operator
Dynamic 游标运算符图标Dynamic cursor operator icon DynamicDynamic Dynamic 运算符使用可以查看其他游标所做的任何更改的游标。The Dynamic operator uses a cursor that can see all changes made by others.
Fetch Query 游标运算符图标Fetch query cursor operator icon Fetch QueryFetch Query 当对游标发出提取命令时, Fetch Query 运算符将检索行。The Fetch Query operator retrieves rows when a fetch is issued against a cursor.
Filter(数据库引擎)运算符图标Filter (Database Engine) operator icon FilterFilter Filter 运算符扫描输入,仅返回那些符合 Argument 列中的筛选表达式(谓词)的行。The Filter operator scans the input, returning only those rows that satisfy the filter expression (predicate) that appears in the Argument column.
NoneNone Flow DistinctFlow Distinct Flow Distinct 逻辑运算符用于通过扫描输入来删除重复项。The Flow Distinct logical operator scans the input, removing duplicates. 虽然 Distinct 运算符在生成任何输出前使用所有的输入,但 FlowDistinct 运算符在从输入获得行时会返回每行(除非该行是一个重复项,若是这样则删除该行)。Whereas the Distinct operator consumes all input before producing any output, the FlowDistinct operator returns each row as it is obtained from the input (unless that row is a duplicate, in which case it is discarded).
Foreign Key References Check 运算符图标Foreign key references check operator icon Foreign Key References CheckForeign Key References Check Foreign Key References Check 运算符通过将修改行与引用表中的行进行比较,就地执行引用完整性检查,以便验证修改不会中断引用完整性。The Foreign Key References Check operator performs referential integrity checks in place, by comparing the modified row to the rows in the referencing tables to verify that the modification will not break the referential integrity. 当相同主键或唯一键上存在超过 253 个外键引用时,将使用 Foreign Key References Check 运算符。The Foreign Key References Check operator is used when more than 253 foreign key references exist on the same primary or unique key. Foreign Key References Check 是逻辑和物理运算符。Foreign Key References Check is a logical and physical operator.
NoneNone Full Outer JoinFull Outer Join Full Outer Join 逻辑运算符从第一个(顶端)输入与第二个(底端)输入相联接的行中返回每个满足联接谓词的行。The Full Outer Join logical operator returns each row satisfying the join predicate from the first (top) input joined with each row from the second (bottom) input. 它还可以从下列输入返回行:It also returns rows from:

- 在第二个输入中没有匹配项的第一个输入。-The first input that had no matches in the second input.

- 在第一个输入中没有匹配项的第二个输入。-The second input that had no matches in the first input.

不包含匹配值的输入将作为空值返回。The input that does not contain the matching values is returned as a null value. Full Outer Join 是一个逻辑运算符。Full Outer Join is a logical operator.
Gather Streams 并行度运算符图标Gather streams parallelism operator icon Gather StreamsGather Streams Gather Streams 运算符仅用在并行查询计划中。The Gather Streams operator is only used in parallel query plans. Gather Streams 运算符处理几个输入流并通过组合这几个输入流生成单个记录输出流。The Gather Streams operator consumes several input streams and produces a single output stream of records by combining the input streams. 记录的内容和格式不会改变。The record contents and format are not changed. 如果此运算符保留顺序,则所有的输入流都必须有序。If this operator is order preserving, all input streams must be ordered. 如果输出已排序,则 Argument 列会包含一个 ORDER BY:() 谓词和正在排序的列名称。If the output is ordered, the Argument column contains an ORDER BY:() predicate and the names of columns being ordered. Gather Streams 是一个逻辑运算符。Gather Streams is a logical operator.
Hash Match 运算符图标Hash match operator icon Hash MatchHash Match Hash Match 运算符通过计算其生成输入中每行的哈希值生成哈希表。The Hash Match operator builds a hash table by computing a hash value for each row from its build input. HASH:() 谓词以及一个用于创建哈希值的列的列表会出现在 Argument 列中。A HASH:() predicate with a list of columns used to create a hash value appears in the Argument column. 然后,该谓词为每个探测行(如果适用)计算哈希值(使用相同的哈希函数)并在哈希表内查找匹配项。Then, for each probe row (as applicable), it computes a hash value (using the same hash function) and looks in the hash table for matches. 如果存在残留谓词(由 Argument 列中的 RESIDUAL:() 标识),则还须满足此残留谓词,只有这样行才能被视为是匹配项。If a residual predicate is present (identified by RESIDUAL:() in the Argument column), that predicate must also be satisfied for rows to be considered a match. 行为取决于所执行的逻辑操作:Behavior depends on the logical operation being performed:

- 对于联接,使用第一个(顶端)输入生成哈希表,使用第二个(底端)输入探测哈希表。-For any joins, use the first (top) input to build the hash table and the second (bottom) input to probe the hash table. 按联接类型规定的模式输出匹配项(或不匹配项)。Output matches (or nonmatches) as dictated by the join type. 如果多个联接使用相同的联接列,这些操作将分组为一个哈希组。If multiple joins use the same join column, these operations are grouped into a hash team.

- 对于非重复或聚合运算符,使用输入生成哈希表(删除重复项并计算聚合表达式)。-For the distinct or aggregate operators, use the input to build the hash table (removing duplicates and computing any aggregate expressions). 生成哈希表时,扫描该表并输出所有项。When the hash table is built, scan the table and output all entries.

- 对于 union 运算符,使用第一个输入生成哈希表(删除重复项)。-For the union operator, use the first input to build the hash table (removing duplicates). 使用第二个输入(它必须没有重复项)探测哈希表,返回所有没有匹配项的行,然后扫描该哈希表并返回所有项。Use the second input (which must have no duplicates) to probe the hash table, returning all rows that have no matches, then scan the hash table and return all entries.
Hash Match 是一个物理运算符。Hash Match is a physical operator. 有关详细信息,请参阅理解哈希联接For more information, see Understanding Hash joins.
If 语言元素图标If language element icon 如果If If 运算符执行基于表达式的有条件处理。The If operator carries out conditional processing based on an expression. If 是一个语言元素。If is a language element.
NoneNone Inner JoinInner Join Inner Join 逻辑运算符返回满足联接第一个(顶端)输入与第二个(底端)输入的每一行。The Inner Join logical operator returns each row that satisfies the join of the first (top) input with the second (bottom) input.
Insert(数据库引擎)运算符图标Insert (Database Engine) operator icon InsertInsert Insert 逻辑运算符将每行从其输入插入 Argument 列内指定的对象中。The Insert logical operator inserts each row from its input into the object specified in the Argument column. 相应的物理运算符为 Table InsertIndex InsertClustered Index Insert 运算符。The physical operator is either the Table Insert, Index Insert, or Clustered Index Insert operator.
Inserted Scan 运算符图标Inserted scan operator icon Inserted ScanInserted Scan Inserted Scan 运算符扫描 插入的 表。The Inserted Scan operator scans the inserted table. Inserted Scan 既是一个逻辑运算符,也是一个物理运算符。Inserted Scan is a logical and physical operator.
Intrinsic 语言元素图标Intrinsic language element icon IntrinsicIntrinsic Intrinsic 运算符调用内部 Transact-SQLTransact-SQL 函数。The Intrinsic operator invokes an internal Transact-SQLTransact-SQL function. Intrinsic 是一个语言元素。Intrinsic is a language element.
Iterator 通用运算符图标Iterator catchall operator icon 迭代器Iterator 生成图形显示计划的逻辑找不到 Iterator 的合适图标时,将显示通用图标。The Iterator catchall icon is displayed when a suitable icon for the iterator cannot be found by the logic that produces graphical Showplans. 通用图标不一定指示存在错误。The catchall icon does not necessarily indicate an error condition. 有三种通用图标:蓝色(用于迭代器)、橙色(用于游标)和绿色(用于 Transact-SQLTransact-SQL 语言构造)。There are three catchall icons: blue (for iterators), orange (for cursors), and green (for Transact-SQLTransact-SQL language constructs).
Bookmark Lookup 运算符图标Bookmark lookup operator icon Key LookupKey Lookup Key Lookup 运算符是在具有聚集索引的表上进行的书签查找。The Key Lookup operator is a bookmark lookup on a table with a clustered index. Argument 列包含聚集索引的名称和用来在聚集索引中查找行的聚集键。The Argument column contains the name of the clustered index and the clustering key used to look up the row in the clustered index. Key Lookup 通常带有 Nested Loops 运算符。Key Lookup is always accompanied by a Nested Loops operator. 如果 Argument 列中出现 WITH PREFETCH 子句,则表示查询处理器已决定在聚集索引中查找书签时将使用异步预提取(预读)作为最佳选择。If the WITH PREFETCH clause appears in the Argument column, the query processor has determined that it is optimal to use asynchronous prefetching (read-ahead) when looking up bookmarks in the clustered index.

在查询计划中使用 Key Lookup 运算符表明该查询可能会从性能优化中获益。The use of a Key Lookup operator in a query plan indicates that the query might benefit from performance tuning. 例如,添加涵盖索引可能会提高查询性能。For example, query performance might be improved by adding a covering index.
Keyset 游标运算符图标Keyset cursor operator icon KeysetKeyset Keyset 运算符使用的游标可用于查看其他用户所做的更新,而不能查看其他用户所做的插入。The Keyset operator uses a cursor that can see updates, but not inserts made by others.
Language 元素通用图标Language element catchall icon Language 元素Language Element 生成图形显示计划的逻辑找不到 Language Element 的合适图标时,将显示通用图标。The Language Element catchall icon is displayed when a suitable icon for the iterator cannot be found by the logic that produces graphical Showplans. 通用图标不一定指示存在错误。The catchall icon does not necessarily indicate an error condition. 有三种通用图标:蓝色(用于迭代器)、橙色(用于游标)和绿色(用于 Transact-SQLTransact-SQL 语言构造)。There are three catchall icons: blue (for iterators), orange (for cursors), and green (for Transact-SQLTransact-SQL language constructs).
NoneNone Left Anti Semi JoinLeft Anti Semi Join 当第二个(底端)输入中没有匹配行时, Left Anti Semi Join 运算符则返回第一个(顶端)输入中的每一行。The Left Anti Semi Join operator returns each row from the first (top) input when there is no matching row in the second (bottom) input. 如果 Argument 列内不存在任何联接谓词,则每行都是一个匹配行。If no join predicate exists in the Argument column, each row is a matching row. Left Anti Semi Join 是一个逻辑运算符。Left Anti Semi Join is a logical operator.
NoneNone Left Outer JoinLeft Outer Join Left Outer Join 运算符返回满足联接第一个(顶端)输入与第二个(底端)输入的每一行。The Left Outer Join operator returns each row that satisfies the join of the first (top) input with the second (bottom) input. 它还返回任何在第二个输入中没有匹配行的第一个输入中的行。It also returns any rows from the first input that had no matching rows in the second input. 第二个输入中的非匹配行作为空值返回。The nonmatching rows in the second input are returned as null values. 如果 Argument 列内不存在任何联接谓词,则每行都是一个匹配行。If no join predicate exists in the Argument column, each row is a matching row. Left Outer Join 是一个逻辑运算符。Left Outer Join is a logical operator.
NoneNone Left Semi JoinLeft Semi Join 当第二个(底端)输入中没有匹配行时, Left Semi Join 运算符则返回第一个(顶端)输入中的每一行。The Left Semi Join operator returns each row from the first (top) input when there is a matching row in the second (bottom) input. 如果 Argument 列内不存在任何联接谓词,则每行都是一个匹配行。If no join predicate exists in the Argument column, each row is a matching row. Left Semi Join 是一个逻辑运算符。Left Semi Join is a logical operator.
Log Row Scan 运算符图标Log row scan operator icon Log Row ScanLog Row Scan Log Row Scan 运算符用于扫描事务日志。The Log Row Scan operator scans the transaction log. Log Row Scan 既是一个逻辑运算符,也是一个物理运算符。Log Row Scan is a logical and physical operator.
Merge Interval 运算符图标Merge interval operator icon Merge IntervalMerge Interval Merge Interval 运算符可合并多个(可能重叠的)间隔以得出最小的不重叠间隔,然后将其用于查找索引项。The Merge Interval operator merges multiple (potentially overlapping) intervals to produce minimal, nonoverlapping intervals that are then used to seek index entries. 此运算符通常出现在 Constant Scan 运算符中的一个或多个 Compute Scalar 运算符上方,Constant Scan 运算符构造了此运算符所合并的间隔(表示为一行中的列)。This operator typically appears above one or more Compute Scalar operators over Constant Scan operators, which construct the intervals (represented as columns in a row) that this operator merges. Merge Interval 既是一个逻辑运算符,也是一个物理运算符。Merge Interval is a logical and physical operator.
Merge Join 运算符图标Merge join operator icon 合并联接Merge Join Merge Join 运算符执行内部联接、左外部联接、左半部联接、左反半部联接、右外部联接、右半部联接、右反半部联接和联合逻辑运算。The Merge Join operator performs the inner join, left outer join, left semi join, left anti semi join, right outer join, right semi join, right anti semi join, and union logical operations.

Argument 列中,如果操作执行一对多联接,则 Merge Join 运算符将包含 MERGE:() 谓词;如果操作执行多对多联接,则该运算符将包含 MANY-TO-MANY MERGE:() 谓词。In the Argument column, the Merge Join operator contains a MERGE:() predicate if the operation is performing a one-to-many join, or a MANY-TO-MANY MERGE:() predicate if the operation is performing a many-to-many join. Argument 列还包含一个用于执行操作的列的列表,该列表以逗号分隔。The Argument column also includes a comma-separated list of columns used to perform the operation. Merge Join 运算符要求在各自的列上对两个输入进行排序,这可以通过在查询计划中插入显式排序操作来实现。The Merge Join operator requires two inputs sorted on their respective columns, possibly by inserting explicit sort operations into the query plan. 如果不需要显式排序(例如,如果数据库内有合适的 B 树索引或可以对多个操作(如合并联接和对汇总分组)使用排序顺序),则合并联接尤其有效。Merge join is particularly effective if explicit sorting is not required, for example, if there is a suitable B-tree index in the database or if the sort order can be exploited for multiple operations, such as a merge join and grouping with roll up. Merge Join 是一个物理运算符。Merge Join is a physical operator. 有关详细信息,请参阅理解合并联接For more information, see Understanding Merge joins.
Nested Loops 运算符图标Nested loops operator icon Nested LoopsNested Loops Nested Loops 运算符执行内部联接、左外部联接、左半部联接和左反半部联接逻辑运算。The Nested Loops operator performs the inner join, left outer join, left semi join, and left anti semi join logical operations. 嵌套循环联接通常使用索引,针对外部表的每一行在内部表中执行搜索。Nested loops joins perform a search on the inner table for each row of the outer table, typically using an index. 查询处理器根据预计的开销来决定是否对外部输入进行排序,以改进内部输入索引上的搜索定位。The query processor decides, based on anticipated costs, whether to sort the outer input in order to improve locality of the searches on the index over the inner input. 将基于所执行的逻辑操作返回所有满足 Argument 列中的(可选)谓词的行。Any rows that satisfy the (optional) predicate in the Argument column are returned as applicable, based on the logical operation being performed. 如果 OPTIMIZED 特性设置为“True”,则表示使用了优化的嵌套循环(或批处理排序) 。When the OPTIMIZED attribute is set to True, it means that an Optimized Nested Loops (or Batch Sort) is used. Nested Loops 是一个物理运算符。Nested Loops is a physical operator. 有关详细信息,请参阅了解嵌套循环联接For more information, see Understanding Nested Loops joins.
Nonclustered Index Delete 运算符图标Nonclustered index delete operator icon Nonclustered Index DeleteNonclustered Index Delete Nonclustered Index Delete 运算符通过 Argument 列中指定的非聚集索引删除输入行。The Nonclustered Index Delete operator deletes input rows from the nonclustered index specified in the Argument column. Nonclustered Index Delete 是一个物理运算符。Nonclustered Index Delete is a physical operator.
Nonclustered Index Insert 运算符图标Nonclustered index insert operator icon Index InsertIndex Insert Index Insert 运算符用于将行从其输入插入到 Argument 列中指定的非聚集索引中。The Index Insert operator inserts rows from its input into the nonclustered index specified in the Argument column. Argument 列还包含一个 SET:() 谓词,用于指示为每一列设置的值。The Argument column also contains a SET:() predicate, which indicates the value to which each column is set. Index Insert 是一个物理运算符。Index Insert is a physical operator.
Nonclustered Index Scan 运算符图标Nonclustered index scan operator icon Index ScanIndex Scan Index Scan 运算符从 Argument 列中指定的非聚集索引中检索所有行。The Index Scan operator retrieves all rows from the nonclustered index specified in the Argument column. 如果可选的 WHERE:() 谓词出现在 Argument 列中,则仅返回满足此谓词的那些行。If an optional WHERE:() predicate appears in the Argument column, only those rows that satisfy the predicate are returned. Index Scan 既是一个逻辑运算符,也是一个物理运算符。Index Scan is a logical and physical operator.
Nonclustered Index Seek 运算符图标Nonclustered index seek operator icon Index SeekIndex Seek Index Seek 运算符利用索引的查找功能从非聚集索引中检索行。The Index Seek operator uses the seeking ability of indexes to retrieve rows from a nonclustered index. Argument 列包含所使用的非聚集索引的名称。The Argument column contains the name of the nonclustered index being used. 它还包括 SEEK:() 谓词。It also contains the SEEK:() predicate. 存储引擎仅使用索引来处理满足 SEEK:() 谓词的行。The storage engine uses the index to process only those rows that satisfy the SEEK:() predicate. 它可能还包含一个 WHERE:() 谓词,其中存储引擎对满足 SEEK:() 谓词的所有行进行计算(不使用索引来完成)。It optionally may include a WHERE:() predicate, which the storage engine will evaluate against all rows that satisfy the SEEK:() predicate (it does not use the indexes to do this). 如果 Argument 列包含 ORDERED 子句,则表示查询处理器已决定必须按非聚集索引排序行的顺序返回行。If the Argument column contains the ORDERED clause, the query processor has determined that the rows must be returned in the order in which the nonclustered index has sorted them. 如果没有 ORDERED 子句,则存储引擎将以最佳方式(不保证对输出排序)搜索索引。If the ORDERED clause is not present, the storage engine searches the index in the optimal way (which does not guarantee that the output will be sorted). 如果让输出保持其顺序,则效率可能低于生成非排序输出。Allowing the output to retain its ordering may be less efficient than producing nonsorted output. Index Seek 既是一个逻辑运算符,也是一个物理运算符。Index Seek is a logical and physical operator.
Nonclustered Index Spool 运算符图标Nonclustered index spool operator icon Index SpoolIndex Spool Index Spool 物理运算符在 Argument 列中包含 SEEK:() 谓词。The Index Spool physical operator contains a SEEK:() predicate in the Argument column. Index Spool 运算符扫描其输入行,将每行的副本放置在隐藏的假脱机文件(存储在 tempdb 数据库中且只在查询的生存期内存在)中,并在这些行上生成非聚集索引。The Index Spool operator scans its input rows, placing a copy of each row in a hidden spool file (stored in the tempdb database and existing only for the lifetime of the query), and builds a nonclustered index on the rows. 这样可以使用索引的查找功能来仅输出那些满足 SEEK:() 谓词的行。This allows you to use the seeking capability of indexes to output only those rows that satisfy the SEEK:() predicate. 如果重绕该运算符(例如通过 Nested Loops 运算符重绕),但不需要任何重新绑定,则将使用假脱机数据,而不用重新扫描输入。If the operator is rewound (for example, by a Nested Loops operator) but no rebinding is needed, the spooled data is used instead of rescanning the input.
Nonclustered Index Update 运算符图标Nonclustered index update operator icon Nonclustered Index UpdateNonclustered Index Update Nonclustered Index Update 物理运算符用于更新 Argument 列内指定的非聚集索引中的输入行。The Nonclustered Index Update physical operator updates rows from its input in the nonclustered index specified in the Argument column. 如果存在 SET:() 谓词,则将每个更新的列设置为该值。If a SET:() predicate is present, each updated column is set to this value. Nonclustered Index Update 是一个物理运算符。Nonclustered Index Update is a physical operator.
Online Index Insert 运算符图标Online index insert operator icon Online Index InsertOnline Index Insert Online Index Insert 物理运算符指示索引创建、更改或删除操作是在线执行的。The Online Index Insert physical operator indicates that an index create, alter, or drop operation is performed online. 也就是说,基础表数据在索引操作期间仍然对用户可用。That is, the underlying table data remains available to users during the index operation.
NoneNone ParallelismParallelism Parallelism 运算符(或交换迭代器)执行分发流、收集流和对流重新分区逻辑操作 。The Parallelism operator (or Exchange Iterator) performs the distribute streams, gather streams, and repartition streams logical operations. Argument 列可以包含一个 PARTITION COLUMNS:() 谓词和一个以逗号分隔的分区列的列表。The Argument columns can contain a PARTITION COLUMNS:() predicate with a comma-separated list of the columns being partitioned. Argument 列还可以包含一个 ORDER BY:() 谓词,以列出分区过程中要保留排序顺序的列。The Argument columns can also contain an ORDER BY:() predicate, listing the columns to preserve the sort order for during partitioning. Parallelism 是物理运算符。Parallelism is a physical operator. 有关 Parallelism 运算符的详细信息,请参阅 Craig Freedman 的博客系列For more information about the Parallelism operator, see Craig Freedman's blog series.

注意: 如果查询已编译为并行查询,但在运行时作为串行查询运行,则通过 SET STATISTICS XML 或使用 SQL Server Management StudioSQL Server Management Studio 中的“包括实际执行计划”选项生成的显示计划输出将不会包含 Parallelism 运算符的 RunTimeInformation 元素 。Note: If a query has been compiled as a parallel query, but at run time it is run as a serial query, the Showplan output generated by SET STATISTICS XML or by using the Include Actual Execution Plan option in SQL Server Management StudioSQL Server Management Studio will not contain the RunTimeInformation element for the Parallelism operator. 在 SET STATISTICS PROFILE 输出中,为 Parallelism 运算符显示的实际行计数和实际执行数将为零。In SET STATISTICS PROFILE output, the actual row counts and actual number of executes will display zeroes for the Parallelism operator. 出现任何一种情况时,都意味着 Parallelism 运算符只在查询编译时使用,未在运行时查询计划中使用。When either condition occurs, it means that the Parallelism operator was only used during query compilation and not in the run-time query plan. 请注意,如果服务器上的并发负荷很高,则并行查询计划有时会以串行方式运行。Note that sometimes parallel query plans are run in serial if there is a high concurrent load on the server.
Parameter Table Scan 运算符图标Parameter table scan operator icon Parameter Table ScanParameter Table Scan Parameter Table Scan 运算符扫描在当前查询中用作参数的表。The Parameter Table Scan operator scans a table that is acting as a parameter in the current query. 该运算符一般用于存储过程内的 INSERT 查询。Typically, this is used for INSERT queries within a stored procedure. Parameter Table Scan 既是一个逻辑运算符,也是一个物理运算符。Parameter Table Scan is a logical and physical operator.
NoneNone Partial AggregatePartial Aggregate Partial Aggregate 用于并行计划中。Partial Aggregate is used in parallel plans. 它将聚合功能应用到尽可能多的输入行中,以便不必执行向磁盘写入数据的操作(称为“溢出”)。It applies an aggregation function to as many input rows as possible so that writing to disk (known as a "spill") is not necessary. Hash Match 是实现分区聚合的唯一一个物理运算符(迭代器)。Hash Match is the only physical operator (iterator) that implements partition aggregation. Partial Aggregate 是一个逻辑运算符。Partial Aggregate is a logical operator.
Population Query 游标运算符图标Population query cursor operator icon Population QueryPopulation Query Population Query 运算符在打开游标时填充游标的工作表。The Population Query operator populates the work table of a cursor when the cursor is opened.
Refresh Query 游标运算符图标Refresh query cursor operator icon Refresh QueryRefresh Query Refresh Query 运算符为提取缓冲区中的行提取当前数据。The Refresh Query operator fetches current data for rows in the fetch buffer.
Remote Delete 运算符图标Remote delete operator icon Remote DeleteRemote Delete Remote Delete 运算符用于从远程对象中删除输入行。The Remote Delete operator deletes the input rows from a remote object. Remote Delete 既是一个逻辑运算符,也是一个物理运算符。Remote Delete is a logical and physical operator.
Remote index seek showplan 运算符Remote index seek showplan operator Remote Index ScanRemote Index Scan Remote Index Scan 运算符可以扫描在 Argument 列中指定的远程索引。The Remote Index Scan operator scans the remote index specified in the Argument column. Remote Index Scan 既是一个逻辑运算符,也是一个物理运算符。Remote Index Scan is a logical and physical operator.
Remote index seek showplan 运算符Remote index seek showplan operator Remote Index SeekRemote Index Seek Remote Index Seek 运算符利用远程索引对象的查找功能来检索行。The Remote Index Seek operator uses the seeking ability of a remote index object to retrieve rows. Argument 列包含所使用的远程索引名称和 SEEK:() 谓词。The Argument column contains the name of the remote index being used and the SEEK:() predicate. Remote Index Seek 是一个逻辑物理运算符。Remote Index Seek is a logical physical operator.
Remote Insert 运算符图标Remote insert operator icon Remote InsertRemote Insert Remote Insert 运算符将输入行插入到远程对象。The Remote Insert operator inserts the input rows into a remote object. Remote Insert 既是一个逻辑运算符,也是一个物理运算符。Remote Insert is a logical and physical operator.
Remote Query 运算符图标Remote query operator icon Remote QueryRemote Query Remote Query 运算符将查询提交给远程源。The Remote Query operator submits a query to a remote source. 发送给远程服务器的查询文本显示在 Argument 列中。The text of the query sent to the remote server appears in the Argument column. Remote Query 既是一个逻辑运算符,也是一个物理运算符。Remote Query is a logical and physical operator.
Remote Scan 运算符图标Remote scan operator icon Remote ScanRemote Scan Remote Scan 运算符扫描远程对象。The Remote Scan operator scans a remote object. 远程对象的名称显示在 Argument 列中。The name of the remote object appears in the Argument column. Remote Scan 既是一个逻辑运算符,也是一个物理运算符。Remote Scan is a logical and physical operator.
Remote Update 运算符图标Remote update operator icon Remote UpdateRemote Update Remote Update 运算符将更新远程对象中的输入行。The Remote Update operator updates the input rows in a remote object. Remote Update 既是一个逻辑运算符,也是一个物理运算符。Remote Update is a logical and physical operator.
Repartition Streams 并行度运算符图标Repartition streams parallelism operator icon Repartition StreamsRepartition Streams Repartition Streams 运算符(或交换迭代器)使用多个流并生成多个记录流。The Repartition Streams operator (or exchange iterator) consumes multiple streams and produces multiple streams of records. 记录的内容和格式不会改变。The record contents and format are not changed. 如果查询优化器使用位图筛选器,则输出流中行的数量将减少。If the query optimizer uses a bitmap filter, the number of rows in the output stream is reduced. 输入流中的每个记录都放入一个输出流中。Each record from an input stream is placed into one output stream. 如果该运算符保留次序,则必须对所有输入流排序并将它们合并到几个有序的输出流中。If this operator is order preserving, all input streams must be ordered and merged into several ordered output streams. 如果将输出分区,那么 Argument 列会包含 PARTITION COLUMNS:() 谓词和分区依据列。如果输出已经排序,则 Argument 列包含一个 ORDER BY:() 谓词和已经排序的列。If the output is partitioned, the Argument column contains a PARTITION COLUMNS:() predicate and the partitioning columns.If the output is ordered, the Argument column contains an ORDER BY:() predicate and the columns being ordered. Repartition Streams 是一个逻辑运算符。Repartition Streams is a logical operator. 该运算符只用于并行查询计划中。The operator is used only in parallel query plans.
Result 语言元素图标Result language element icon 结果Result Result 运算符是查询计划结束时返回的数据。The Result operator is the data returned at the end of a query plan. 它通常是显示计划的根元素。This is usually the root element of a Showplan. Result 是一个语言元素。Result is a language element.
RID Lookup 运算符图标RID lookup operator icon RID LookupRID Lookup RID Lookup 是使用提供的行标识符 (RID) 在堆上进行的书签查找。RID Lookup is a bookmark lookup on a heap using a supplied row identifier (RID). Argument 列包含用于查找表中的行的书签标签和从中查找行的表的名称。The Argument column contains the bookmark label used to look up the row in the table and the name of the table in which the row is looked up. RID Lookup 通常带有 NESTED LOOP JOIN。RID Lookup is always accompanied by a NESTED LOOP JOIN. RID Lookup 是一个物理运算符。RID Lookup is a physical operator. 有关书签查找的详细信息,请参阅 MSDN SQL Server 博客中的Bookmark Lookup(书签查找)。For more information about bookmark lookups, see "Bookmark Lookup" on the MSDN SQL Server blog.
Row Count Spool 运算符图标Row count spool operator icon Row Count SpoolRow Count Spool Row Count Spool 运算符扫描输入,计算现有的行数并返回相同数目的不包含任何数据的行。The Row Count Spool operator scans the input, counting how many rows are present and returning the same number of rows without any data in them. 必须检查现有行数(而非行中包含的数据)时,使用此运算符。This operator is used when it is important to check for the existence of rows, rather than the data contained in the rows. 例如,如果 Nested Loops 运算符执行左半联接操作且联接谓词应用于内部输入,则可以在 Nested Loops 运算符内部输入的顶部放置行计数假脱机。For example, if a Nested Loops operator performs a left semi join operation and the join predicate applies to inner input, a row count spool may be placed at the top of the inner input of the Nested Loops operator. 这样, Nested Loops 运算符就可以确定行计数假脱机输出的行数(因为不需要内侧的实际数据)以决定是否返回外部行。Then the Nested Loops operator can determine how many rows are output by the row count spool (because the actual data from the inner side is not needed) to determine whether to return the outer row. Row Count Spool 是一个物理运算符。Row Count Spool is a physical operator.
NoneNone Right Anti Semi JoinRight Anti Semi Join 当第一个(顶端)输入中不存在匹配行时, Right Anti Semi Join 运算符返回第二个(底端)输入中的每一行。The Right Anti Semi Join operator outputs each row from the second (bottom) input when a matching row in the first (top) input does not exist. 匹配行的定义是满足 Argument 列中的谓词的行(如果不存在谓词,则每行都是一个匹配行)。A matching row is defined as a row that satisfies the predicate in the Argument column (if no predicate exists, each row is a matching row). Right Anti Semi Join 是一个逻辑运算符。Right Anti Semi Join is a logical operator.
NoneNone Right Outer JoinRight Outer Join Right Outer Join 运算符返回满足联接第二个(底端)输入与第一个(顶端)输入中每个匹配行的每一行。The Right Outer Join operator returns each row that satisfies the join of the second (bottom) input with each matching row from the first (top) input. 此外,它还返回第二个输入中在第一个输入中没有匹配行的任何行,即与 NULL 联接。It also returns any rows from the second input that had no matching rows in the first input, joined with NULL. 如果 Argument 列内不存在任何联接谓词,则每行都是一个匹配行。If no join predicate exists in the Argument column, each row is a matching row. Right Outer Join 是一个逻辑运算符。Right Outer Join is a logical operator.
NoneNone Right Semi JoinRight Semi Join 当第一个(顶端)输入中存在匹配行时, Right Semi Join 运算符返回第二个(底端)输入中的每一行。The Right Semi Join operator returns each row from the second (bottom) input when there is a matching row in the first (top) input. 如果 Argument 列内不存在任何联接谓词,则每行都是一个匹配行。If no join predicate exists in the Argument column, each row is a matching row. Right Semi Join 是一个逻辑运算符。Right Semi Join is a logical operator.
Segment 运算符图标Segment operator icon Segment Segment 既是一个物理运算符,也是一个逻辑运算符。Segment is a physical and a logical operator. 它基于一个或多个列的值将输入集划分成多个段。It divides the input set into segments based on the value of one or more columns. 这些列显示为 Segment 运算符中的参数。These columns are shown as arguments in the Segment operator. 然后此运算符每次输出一个段。The operator then outputs one segment at a time.
Sequence 运算符图标Sequence operator icon 序列Sequence Sequence 运算符驱动大范围的更新计划。The Sequence operator drives wide update plans. 就其功能而言,该运算符按顺序(从上到下)执行每个输入。Functionally, it executes each input in sequence (top to bottom). 每个输入通常是不同对象的更新。Each input is usually an update of a different object. 该运算符只返回其上一个(底端)输入中的行。It returns only those rows that come from its last (bottom) input. Sequence 既是一个逻辑运算符,也是一个物理运算符。Sequence is a logical and physical operator.
Sequence Project 运算符图标Sequence project operator icon Sequence ProjectSequence Project Sequence Project 运算符将添加列以便计算有序集。The Sequence Project operator adds columns to perform computations over an ordered set. 它基于一个或多个列的值将输入集划分成多个段。It divides the input set into segments based on the value of one or more columns. 然后此运算符每次输出一个段。The operator then outputs one segment at a time. 这些列在 Sequence Project 运算符中作为参数显示。These columns are shown as arguments in the Sequence Project operator. Sequence Project 既是一个逻辑运算符,也是一个物理运算符。Sequence Project is a logical and physical operator.
NoneNone Segment RepartitionSegment Repartition 在并行查询计划中,有时存在迭代器的概念性区域。In a parallel query plan, sometimes there are conceptual regions of iterators. 此类区域中的所有迭代器都可通过并行线程执行。All of the iterators within such a region can be executed by parallel threads. 这些区域本身必须串行执行。The regions themselves must be executed serially. 单个区域内的某些 Parallelism 迭代器称为 Branch RepartitionSome of the Parallelism iterators within an individual region are called Branch Repartition. 两个这样的区域边界上的 Parallelism 迭代器称为 Segment RepartitionThe Parallelism iterator at the boundary of two such regions is called Segment Repartition. Branch RepartitionSegment Repartition 是逻辑运算符。Branch Repartition and Segment Repartition are logical operators.
Snapshot 游标运算符图标Snapshot cursor operator icon 快照Snapshot Snapshot 运算符创建一个看不到其他人所做更改的游标。The Snapshot operator creates a cursor that does not see changes made by others.
Sort 运算符图标Sort operator icon SortSort Sort 运算符可对所有传入的行进行排序。The Sort operator sorts all incoming rows. Argument 列包含 DISTINCT ORDER BY:() 谓词(如果此操作删除了重复项),或 ORDER BY:() 谓词(如果对以逗号分隔的列列表进行排序)。The Argument column contains either a DISTINCT ORDER BY:() predicate if duplicates are removed by this operation, or an ORDER BY:() predicate with a comma-separated list of the columns being sorted. 如果按升序对列排序,则使用值 ASC 作为列的前缀;如果按降序对列排序,则使用值 DESC 作为列的前缀。The columns are prefixed with the value ASC if the columns are sorted in ascending order, or the value DESC if the columns are sorted in descending order. Sort 既是一个逻辑运算符,也是一个物理运算符。Sort is a logical and physical operator.
Split 运算符图标Split operator icon SplitSplit Split 运算符用于优化更新处理。The Split operator is used to optimize update processing. 它将每个更新操作拆分成删除和插入操作。It splits each update operation into a delete and an insert operation. Split 既是一个逻辑运算符,也是一个物理运算符。Split is a logical and physical operator.
Spool 运算符图标Spool operator icon Eager SpoolEager Spool Eager Spool 运算符获取整个输入,并将每行存储在 tempdb 数据库中存储的隐藏临时对象中。The Eager Spool operator takes the entire input, storing each row in a hidden temporary object stored in the tempdb database. 如果重绕该运算符(例如通过 Nested Loops 运算符重绕),但不需要任何重新绑定,则将使用假脱机数据,而不用重新扫描输入。If the operator is rewound (for example, by a Nested Loops operator) but no rebinding is needed, the spooled data is used instead of rescanning the input. 如果需要重新绑定,则将放弃假脱机数据,并通过重新扫描(重新绑定的)输入重新生成假脱机对象。If rebinding is needed, the spooled data is discarded and the spool object is rebuilt by rescanning the (rebound) input. Eager Spool 运算符按“急切”方式生成自己的假脱机文件:当假脱机的父运算符请求第一行时,假脱机运算符将获取所有来自其输入运算符的行并将其存储在假脱机中。The Eager Spool operator builds its spool file in an "eager" manner: when the spool's parent operator asks for the first row, the spool operator consumes all rows from its input operator and stores them in the spool. Eager Spool 是一个逻辑运算符。Eager Spool is a logical operator.
Spool 运算符图标Spool operator icon Lazy SpoolLazy Spool Lazy Spool 逻辑运算符将其输入中的每一行存储到 tempdb 数据库内存储的隐藏临时对象中。The Lazy Spool logical operator stores each row from its input in a hidden temporary object stored in the tempdb database. 如果重绕该运算符(例如通过 Nested Loops 运算符重绕),但不需要任何重新绑定,则将使用假脱机数据,而不用重新扫描输入。If the operator is rewound (for example, by a Nested Loops operator) but no rebinding is needed, the spooled data is used instead of rescanning the input. 如果需要重新绑定,则将放弃假脱机数据,并通过重新扫描(重新绑定的)输入重新生成假脱机对象。If rebinding is needed, the spooled data is discarded and the spool object is rebuilt by rescanning the (rebound) input. Lazy Spool 运算符以“迟缓”方式生成其假脱机文件,即每当假脱机父运算符请求一行时,假脱机运算符便从其输入运算符获取一行,然后将该行存储在假脱机中,而不是一次处理所有行。The Lazy Spool operator builds its spool file in a "lazy" manner, that is, each time the spool's parent operator asks for a row, the spool operator gets a row from its input operator and stores it in the spool, rather than consuming all rows at once. Lazy Spool 是一个逻辑运算符。Lazy Spool is a logical operator.
Spool 运算符图标Spool operator icon SpoolSpool Spool 运算符将中间查询结果保存到 tempdb 数据库中。The Spool operator saves an intermediate query result to the tempdb database.
Stream Aggregate 运算符图标Stream aggregate operator icon Stream AggregateStream Aggregate Stream Aggregate 运算符按一列或多列对行分组,然后计算由查询返回的一个或多个聚合表达式。The Stream Aggregate operator groups rows by one or more columns and then calculates one or more aggregate expressions returned by the query. 此运算符的输出可供查询中的后续运算符引用和/或返回到客户端。The output of this operator can be referenced by later operators in the query, returned to the client, or both. Stream Aggregate 运算符要求输入在组中按列进行排序。The Stream Aggregate operator requires input ordered by the columns within its groups. 如果由于前面的 Sort 运算符或已排序的索引查找或扫描导致数据尚未排序,则优化器将在此运算符前面使用一个 Sort 运算符。The optimizer will use a Sort operator prior to this operator if the data is not already sorted due to a prior Sort operator or due to an ordered index seek or scan. 在 SHOWPLAN_ALL 语句或 SQL Server Management StudioSQL Server Management Studio中的图形执行计划中,GROUP BY 谓词中的列会列在 Argument 列中,而聚合表达式则列在 Defined Values 列中。In the SHOWPLAN_ALL statement or the graphical execution plan in SQL Server Management StudioSQL Server Management Studio, the columns in the GROUP BY predicate are listed in the Argument column, and the aggregate expressions are listed in the Defined Values column. Stream Aggregate 是一个物理运算符。Stream Aggregate is a physical operator.
Switch 运算符图标Switch operator icon 开关Switch Switch 是一种特殊类型的串联迭代器,它具有 n 个输入。Switch is a special type of concatenation iterator that has n inputs. 有一个表达式与每个 Switch 运算符关联。An expression is associated with each Switch operator. 根据表达式的返回值(在 0 到 n-1 之间), Switch 将适当的输入流复制到输出流中。Depending on the return value of the expression (between 0 and n-1), Switch copies the appropriate input stream to the output stream. Switch 的一种用途是与某些运算符(如 TOP 运算符)一起实现涉及快进游标的查询计划。One use of Switch is to implement query plans involving fast forward cursors with certain operators such as the TOP operator. Switch 既是一个逻辑运算符,也是一个物理运算符。Switch is both a logical and physical operator.
Table Delete 运算符图标Table delete operator icon Table DeleteTable Delete Table Delete 物理运算符删除查询执行计划的 Argument 列中所指定表中的行。The Table Delete physical operator deletes rows from the table specified in the Argument column of the query execution plan.
Table Insert 运算符图标Table insert operator icon Table InsertTable Insert Table Insert 运算符将输入的行插入到在查询执行计划的 Argument 列指定的表中。The Table Insert operator inserts rows from its input into the table specified in the Argument column of the query execution plan. Argument 列还包含一个 SET:() 谓词,用于指示为每一列设置的值。The Argument column also contains a SET:() predicate, which indicates the value to which each column is set. 如果 Table Insert 的插入值没有子项,插入的行则来自 Insert 运算符本身。If Table Insert has no children for insert values, then the row inserted is taken from the Insert operator itself. Table Insert 是一个物理运算符。Table Insert is a physical operator.
Table Merge 运算符Table merge operator Table MergeTable Merge Table Merge 运算符可将合并数据流应用到堆。The Table Merge operator applies a merge data stream to a heap. 该运算符可在其 Argument 列中所指定的表中删除、更新或插入行。The operator deletes, updates, or inserts rows in the table specified in the Argument column of the operator. 执行的实际操作取决于该运算符的 Argument 列中指定的 ACTION 列的运行时值。The actual operation performed depends on the run-time value of the ACTION column specified in the Argument column of the operator. Table Merge 是一个物理运算符。Table Merge is a physical operator.
Table Scan 运算符图标Table scan operator icon Table ScanTable Scan Table Scan 运算符从查询执行计划的 Argument 列所指定的表中检索所有行。The Table Scan operator retrieves all rows from the table specified in the Argument column of the query execution plan. 如果 WHERE:() 谓词出现在 Argument 列中,则仅返回满足此谓词的那些行。If a WHERE:() predicate appears in the Argument column, only those rows that satisfy the predicate are returned. Table Scan 既是一个逻辑运算符,也是一个物理运算符。Table Scan is a logical and physical operator.
Table Spool 运算符图标Table spool operator icon Table SpoolTable Spool Table Spool 运算符扫描输入,并将各行的一个副本放入隐藏的假脱机表中,此表存储在 tempdb 数据库中并且仅在查询的生存期内存在。The Table Spool operator scans the input and places a copy of each row in a hidden spool table that is stored in the tempdb database and existing only for the lifetime of the query. 如果重绕该运算符(例如通过 Nested Loops 运算符重绕),但不需要任何重新绑定,则将使用假脱机数据,而不用重新扫描输入。If the operator is rewound (for example, by a Nested Loops operator) but no rebinding is needed, the spooled data is used instead of rescanning the input. Table Spool 是一个物理运算符。Table Spool is a physical operator.
Table Spool 运算符图标Table spool operator icon Window SpoolWindow Spool Window Spool 运算符将每个行扩展为表示与行关联的窗口的行集。The Window Spool operator expands each row into the set of rows that represents the window associated with it. 在查询中,OVER 子句定义查询结果集内的窗口和窗口函数,然后计算窗口中的每个行的值。In a query, the OVER clause defines the window within a query result set and a window function then computes a value for each row in the window. Window Spool 既是一个逻辑运算符,也是一个物理运算符。Window Spool is a logical and physical operator.
Table Update 运算符图标Table update operator icon Table UpdateTable Update Table Update 物理运算符更新查询执行计划的 Argument 列中所指定表中的输入行。The Table Update physical operator updates input rows in the table specified in the Argument column of the query execution plan. SET:() 谓词确定每个更新列的值。The SET:() predicate determines the value of each updated column. 可以在 SET 子句中、此运算符内的其他位置以及此查询内的其他位置引用这些值。These values may be referenced in the SET clause or elsewhere within this operator as well as elsewhere within this query.
Table-valued Function 运算符图标Table-valued function operator icon Table-valued FunctionTable-valued Function Table-valued Function 运算符计算表值函数( Transact-SQLTransact-SQL 或 CLR)并将结果行存储在 tempdb 数据库中。The Table-valued Function operator evaluates a table-valued function (either Transact-SQLTransact-SQL or CLR), and stores the resulting rows in the tempdb database. 当父迭代器请求这些行时, Table-valued Function 将返回 tempdb中的行。When the parent iterators request the rows, Table-valued Function returns the rows from tempdb.

调用表值函数的查询生成具有 Table-valued Function 迭代器的查询计划。Queries with calls to table-valued functions generate query plans with the Table-valued Function iterator. 可以使用不同的参数值计算Table-valued FunctionTable-valued Function can be evaluated with different parameter values:

-
Table-valued Function XML Reader 输入 XML BLOB 作为参数,并生成一个按 XML 文档顺序表示 XML 节点的行集。Table-valued Function XML Reader inputs an XML BLOB as a parameter and produces a rowset representing XML nodes in XML document order. 其他输入参数可能会将返回的 XML 节点限于 XML 文档的子集。Other input parameters may restrict XML nodes returned to a subset of XML document.

-Table Valued Function XML Reader with XPath filter 是一种特殊类型的 XML Reader Table-valued Function ,它将输出限于满足 XPath 表达式的 XML 节点。-Table Valued Function XML Reader with XPath filter is a special type of XML Reader Table-valued Function that restricts output to XML nodes satisfying an XPath expression.

Table-valued Function 既是一个逻辑运算符,也是一个物理运算符。Table-valued Function is a logical and physical operator.
NoneNone Top N SortTop N Sort Top N SortSort 迭代器类似,差别仅在于前者需要前 N 行,而不是整个结果集。Top N Sort is similar to the Sort iterator, except that only the first N rows are needed, and not the entire result set. 如果 N的值较小, SQL ServerSQL Server 查询执行引擎将尝试在内存中执行整个排序操作。For small values of N, the SQL ServerSQL Server query execution engine attempts to perform the entire sort operation in memory. 如果 N的值较大,查询执行引擎将使用更通用的排序方法(该方法不采用 N 作为参数)重新排序。For large values of N, the query execution engine resorts to the more generic method of sorting to which N is not a parameter.
Top 运算符图标Top operator icon TopTop Top 运算符扫描输入,但仅基于排序顺序返回最前面的指定行数或行百分比。The Top operator scans the input, returning only the first specified number or percent of rows, possibly based on a sort order. Argument 列可以包含要检查重复值的列的列表。The Argument column can contain a list of the columns that are being checked for ties. 在更新计划中, Top 运算符用于强制实施行计数限制。In update plans, the Top operator is used to enforce row count limits. Top 既是一个逻辑运算符,也是一个物理运算符。Top is a logical and physical operator.
扩展运算符 (UDX) 图标Extended operator (UDX) icon UDXUDX 扩展运算符 (UDX) 可以实现 SQL ServerSQL Server中的一种 XQuery 或 XPath 操作。Extended Operators (UDX) implement one of many XQuery and XPath operations in SQL ServerSQL Server. 所有 UDX 运算符既是逻辑运算符,又是物理运算符。All UDX operators are both logical and physical operators.

扩展运算符 (UDX) FOR XML 用于将其输入的关系行集序列化为 XML 表示形式,并以单个输出行、单个 BLOB 列的形式存储。Extended operator (UDX) FOR XML is used to serialize the relational row set it inputs into XML representation in a single BLOB column in a single output row. 它是区分顺序的 XML 聚合运算符。It is an order sensitive XML aggregation operator.

扩展运算符 (UDX) XML SERIALIZER 是区分顺序的一种 XML 聚合运算符。Extended operator (UDX) XML SERIALIZER is an order sensitive XML aggregation operator. 它以 XML 文档顺序输入表示 XML 节点或 XQuery 标量的行,并在单个输出行、单个 XML 列中生成序列化的 XML BLOB。It inputs rows representing XML nodes or XQuery scalars in XML document order and produces a serialized XML BLOB in a single XML column in a single output row.

扩展运算符 (UDX) XML FRAGMENT SERIALIZER 是一种特殊类型的 XML SERIALIZER ,用于处理表示在 XQuery 插入数据修改扩展中插入的 XML 片断的输入行。Extended operator (UDX) XML FRAGMENT SERIALIZER is a special type of XML SERIALIZER that is used for processing input rows representing XML fragments being inserted in XQuery insert data modification extension.

扩展运算符 (UDX) XQUERY STRING 计算表示 XML 节点的输入行的 XQuery 字符串值。Extended operator (UDX) XQUERY STRING evaluates the XQuery string value of input rows representing XML nodes. 它是一个区分顺序的字符串聚合运算符。It is an order sensitive string aggregation operator. 它输出一行多列,表示包含输入字符串值的 XQuery 标量。It outputs one row with columns representing the XQuery scalar that contains string value of the input.

扩展运算符 (UDX) XQUERY LIST DECOMPOSER 是一个 XQuery 列表分解运算符。Extended operator (UDX) XQUERY LIST DECOMPOSER is an XQuery list decomposition operator. 对于表示 XML 节点的每个输入行,它至少生成表示 XQuery 标量的一个行,如果输入的是 XSD 列表类型的行,则每个行都包含一个列表元素值。For each input row representing an XML node it produces one or more rows each representing XQuery scalar containing a list element value if the input is of XSD list type.

扩展运算符 (UDX) XQUERY DATA 在表示 XML 节点的输入行上计算 XQuery fn:data() 函数的值。Extended operator (UDX) XQUERY DATA evaluates the XQuery fn:data() function on input representing XML nodes. 它是一个区分顺序的字符串聚合运算符。It is an order sensitive string aggregation operator. 它输出一行多列,表示包含 fn:data() 结果的 XQuery 标量。It outputs one row with columns representing XQuery scalar that contains the result of fn:data().

扩展运算符 XQUERY CONTAINS 在表示 XML 节点的输入行上计算 XQuery fn:contains() 函数的值。Extended operator XQUERY CONTAINS evaluates the XQuery fn:contains() function on input representing XML nodes. 它是一个区分顺序的字符串聚合运算符。It is an order sensitive string aggregation operator. 它输出一行多列,表示包含 fn:contains() 结果的 XQuery 标量。It outputs one row with columns representing XQuery scalar that contains the result of fn:contains().

扩展运算符 UPDATE XML NODE 更新 XML 类型上的 modify() 方法中 XQuery 替换数据修改扩展中的 XML 节点。Extended operator UPDATE XML NODE updates XML node in the XQuery replace data modification extension in the modify() method on XML type.
NoneNone UnionUnion Union 运算符扫描多个输入,输出扫描的每一行并删除重复项。The Union operator scans multiple inputs, outputting each row scanned and removing duplicates. Union 是一个逻辑运算符。Union is a logical operator.
Update(数据库引擎)运算符图标Update (Database Engine) operator icon UpdateUpdate Update 运算符更新在查询执行计划的 Argument 列中所指定对象中的每一输入行。The Update operator updates each row from its input in the object specified in the Argument column of the query execution plan. Update 是一个逻辑运算符。Update is a logical operator. 物理运算符为 Table UpdateIndex UpdateClustered Index UpdateThe physical operator is Table Update, Index Update, or Clustered Index Update.
While 语言元素图标While language element icon WhileWhile While 运算符实现 Transact-SQLTransact-SQL while 循环。The While operator implements the Transact-SQLTransact-SQL while loop. While 是一个语言元素。While is a language element