Clustered Index Insert Showplan 运算符

Clustered Index Insert Showplan 运算符可将其输入行插入到 Argument 列所指定的群集索引中。Argument 列还包含一个 SET:() 谓词,用于指示为每一列设置的值。如果 Clustered Index Insert 没有子级可插入值,则将从 Insert 运算符本身获取要插入的行。

Clustered Index Insert 是一个物理运算符。

Clustered Index Insert 运算符图标图形执行计划图标

示例

下面的示例在具有群集索引的表中插入了一行。执行计划的输出显示查询优化器使用 Clustered Index Insert 运算符插入该行。

USE AdventureWorks;
GO
SET NOCOUNT ON;
GO
SET SHOWPLAN_ALL ON;
GO
INSERT INTO Production.UnitMeasure
VALUES (N'F2', N'Square Feet', GETDATE());
GO

Clustered Index Insert 运算符的执行计划输出如下所示。

PhysicalOp 
-----------------------------------------------------------------------
Clustered Index Insert

Argument
-----------------------------------------------------------------------
OBJECT:([AdventureWorks].[Production].[UnitMeasure].[PK_UnitMeasure_UnitMeasureCode]),
OBJECT:([AdventureWorks].[Production].[UnitMeasure].[AK_UnitMeasure_Name]), 
SET:([AdventureWorks].[Production].[UnitMeasure].[UnitMeasureCode] = 
RaiseIfNull([Expr1003]),[AdventureWorks].[Production].[UnitMeasure].[Name] = 
RaiseIfNull([Expr1004]),[AdventureWorks].[Production].[UnitMeasure].[ModifiedDate] = RaiseIfNull(getdate())),
DEFINE:([Expr1003]=CONVERT_IMPLICIT(nchar(3),[@1],0), 
[Expr1004]=CONVERT_IMPLICIT(nvarchar(50),[@2],0), [ConstExpr1006]=getdate())