Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-16"?>
- <ShowPlanXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="1.2" Build="12.0.4213.0" xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan">
- <BatchSequence>
- <Batch>
- <Statements>
- <StmtSimple StatementCompId="1" StatementEstRows="1" StatementId="1" StatementOptmLevel="TRIVIAL" CardinalityEstimationModelVersion="120" StatementSubTreeCost="0.0200032" StatementText="DECLARE @p1 "MySchema"."PointTable";

insert into @p1 values(10001769996,N'ABCDEFGH',N'N/A',N'E')" StatementType="INSERT" QueryHash="0x96C01A0EC41C2D94" QueryPlanHash="0x802C80E44EFB66F2" RetrievedFromCache="false">
- <StatementSetOptions ANSI_NULLS="true" ANSI_PADDING="true" ANSI_WARNINGS="true" ARITHABORT="true" CONCAT_NULL_YIELDS_NULL="true" NUMERIC_ROUNDABORT="false" QUOTED_IDENTIFIER="true" />
- <QueryPlan NonParallelPlanReason="CouldNotGenerateValidParallelPlan" CachedPlanSize="16" CompileTime="0" CompileCPU="0" CompileMemory="160">
- <MemoryGrantInfo SerialRequiredMemory="0" SerialDesiredMemory="0" />
- <OptimizerHardwareDependentProperties EstimatedAvailableMemoryGrant="208539" EstimatedPagesCached="104269" EstimatedAvailableDegreeOfParallelism="4" />
- <RelOp AvgRowSize="9" EstimateCPU="2E-06" EstimateIO="0.02" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Insert" NodeId="0" Parallel="false" PhysicalOp="Clustered Index Insert" EstimatedTotalSubtreeCost="0.0200032">
- <OutputList />
- <ScalarInsert DMLRequestSort="false">
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Column="Expr1002" />
- <ScalarOperator ScalarString="(10001769996)">
- <Const ConstValue="(10001769996)" />
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1003" />
- <ScalarOperator ScalarString="'ABCDEFGH'">
- <Const ConstValue="'ABCDEFGH'" />
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1004" />
- <ScalarOperator ScalarString="'N/A'">
- <Const ConstValue="'N/A'" />
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1005" />
- <ScalarOperator ScalarString="'E'">
- <Const ConstValue="'E'" />
- </ScalarOperator>
- </DefinedValue>
- </DefinedValues>
- <Object Table="[@p1]" Index="[PK__#AD3019C__9A6192914620CC6E]" Storage="RowStore" />
- <Object Table="[@p1]" Index="[UQ__#AD3019C__77168D961F01F759]" Storage="RowStore" />
- <SetPredicate>
- <ScalarOperator ScalarString="[ObjectId] = [Expr1002],[PointName] = [Expr1003],[Location] = [Expr1004],[Region] = [Expr1005]">
- <ScalarExpressionList>
- <ScalarOperator>
- <MultipleAssign>
- <Assign>
- <ColumnReference Column="ObjectId" />
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Expr1002" />
- </Identifier>
- </ScalarOperator>
- </Assign>
- <Assign>
- <ColumnReference Column="PointName" />
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Expr1003" />
- </Identifier>
- </ScalarOperator>
- </Assign>
- <Assign>
- <ColumnReference Column="Location" />
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Expr1004" />
- </Identifier>
- </ScalarOperator>
- </Assign>
- <Assign>
- <ColumnReference Column="Region" />
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Expr1005" />
- </Identifier>
- </ScalarOperator>
- </Assign>
- </MultipleAssign>
- </ScalarOperator>
- </ScalarExpressionList>
- </ScalarOperator>
- </SetPredicate>
- </ScalarInsert>
- </RelOp>
- </QueryPlan>
- </StmtSimple>
- </Statements>
- <Statements>
- <StmtSimple StatementCompId="2" StatementEstRows="2" StatementId="2" StatementOptmLevel="FULL" StatementOptmEarlyAbortReason="GoodEnoughPlanFound" CardinalityEstimationModelVersion="120" StatementSubTreeCost="0.0644213" StatementText="

 MERGE "MySchema"."Point" AS t
 USING (
 SELECT "ObjectId", "PointName", z."Id" AS "LocationId", i."Id" AS "Region"
 FROM @p1 AS d
 JOIN "MySchema"."Region" AS i ON i."Name" = d."Region"
 LEFT JOIN "MySchema"."Location" AS z ON z."Name" = d."Location" AND z."Region" = i."Id"
 ) AS s
 ON s."ObjectId" = t."ObjectId"
 WHEN NOT MATCHED BY TARGET 
 THEN INSERT ("ObjectId", "Name", "LocationId", "Region") VALUES (s."ObjectId", s."PointName", s."LocationId", s."Region")
 WHEN MATCHED 
 THEN UPDATE 
 SET "Name" = s."PointName"
 , "LocationId" = s."LocationId"
 , "Region" = s."Region"
 OUTPUT $action, inserted.*, deleted.*;" StatementType="MERGE" QueryHash="0x4608E0319EEE1707" QueryPlanHash="0x8CA751140A9EF083" RetrievedFromCache="false">
- <StatementSetOptions ANSI_NULLS="true" ANSI_PADDING="true" ANSI_WARNINGS="true" ARITHABORT="true" CONCAT_NULL_YIELDS_NULL="true" NUMERIC_ROUNDABORT="false" QUOTED_IDENTIFIER="true" />
- <QueryPlan NonParallelPlanReason="CouldNotGenerateValidParallelPlan" CachedPlanSize="128" CompileTime="8" CompileCPU="7" CompileMemory="976">
- <MemoryGrantInfo SerialRequiredMemory="512" SerialDesiredMemory="544" />
- <OptimizerHardwareDependentProperties EstimatedAvailableMemoryGrant="208539" EstimatedPagesCached="104269" EstimatedAvailableDegreeOfParallelism="4" />
- <RelOp AvgRowSize="112" EstimateCPU="2E-07" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="2" LogicalOp="Compute Scalar" NodeId="0" Parallel="false" PhysicalOp="Compute Scalar" EstimatedTotalSubtreeCost="0.0644213">
- <OutputList>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Column="Expr1012" />
- <ColumnReference Column="Expr1013" />
- <ColumnReference Column="Expr1014" />
- <ColumnReference Column="Expr1015" />
- <ColumnReference Column="Expr1016" />
- </OutputList>
- <ComputeScalar>
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Column="Expr1012" />
- <ScalarOperator ScalarString="CASE WHEN [OriginalMergeAction1030]=(1) THEN N'UPDATE' ELSE CASE WHEN [OriginalMergeAction1030]=(4) THEN N'INSERT' ELSE N'DELETE' END END">
- <IF>
- <Condition>
- <ScalarOperator>
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="OriginalMergeAction1030" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="(1)" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Condition>
- <Then>
- <ScalarOperator>
- <Const ConstValue="N'UPDATE'" />
- </ScalarOperator>
- </Then>
- <Else>
- <ScalarOperator>
- <IF>
- <Condition>
- <ScalarOperator>
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="OriginalMergeAction1030" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="(4)" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Condition>
- <Then>
- <ScalarOperator>
- <Const ConstValue="N'INSERT'" />
- </ScalarOperator>
- </Then>
- <Else>
- <ScalarOperator>
- <Const ConstValue="N'DELETE'" />
- </ScalarOperator>
- </Else>
- </IF>
- </ScalarOperator>
- </Else>
- </IF>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1013" />
- <ScalarOperator ScalarString="CASE WHEN [OriginalMergeAction1030]=(4) THEN NULL ELSE [TEST].[MySchema].[Point].[ObjectId] as [t].[ObjectId] END">
- <IF>
- <Condition>
- <ScalarOperator>
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="OriginalMergeAction1030" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="(4)" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Condition>
- <Then>
- <ScalarOperator>
- <Const ConstValue="NULL" />
- </ScalarOperator>
- </Then>
- <Else>
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- </Identifier>
- </ScalarOperator>
- </Else>
- </IF>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1014" />
- <ScalarOperator ScalarString="CASE WHEN [OriginalMergeAction1030]=(4) THEN NULL ELSE [Expr1029] END">
- <IF>
- <Condition>
- <ScalarOperator>
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="OriginalMergeAction1030" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="(4)" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Condition>
- <Then>
- <ScalarOperator>
- <Const ConstValue="NULL" />
- </ScalarOperator>
- </Then>
- <Else>
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Expr1029" />
- </Identifier>
- </ScalarOperator>
- </Else>
- </IF>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1015" />
- <ScalarOperator ScalarString="CASE WHEN [OriginalMergeAction1030]=(4) THEN NULL ELSE [TEST].[MySchema].[Point].[LocationId] as [t].[LocationId] END">
- <IF>
- <Condition>
- <ScalarOperator>
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="OriginalMergeAction1030" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="(4)" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Condition>
- <Then>
- <ScalarOperator>
- <Const ConstValue="NULL" />
- </ScalarOperator>
- </Then>
- <Else>
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- </Identifier>
- </ScalarOperator>
- </Else>
- </IF>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1016" />
- <ScalarOperator ScalarString="CASE WHEN [OriginalMergeAction1030]=(4) THEN NULL ELSE [TEST].[MySchema].[Point].[Region] as [t].[Region] END">
- <IF>
- <Condition>
- <ScalarOperator>
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="OriginalMergeAction1030" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="(4)" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Condition>
- <Then>
- <ScalarOperator>
- <Const ConstValue="NULL" />
- </ScalarOperator>
- </Then>
- <Else>
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- </Identifier>
- </ScalarOperator>
- </Else>
- </IF>
- </ScalarOperator>
- </DefinedValue>
- </DefinedValues>
- <RelOp AvgRowSize="104" EstimateCPU="3E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="2" LogicalOp="Sequence" NodeId="3" Parallel="false" PhysicalOp="Sequence" EstimatedTotalSubtreeCost="0.0644211">
- <OutputList>
- <ColumnReference Column="OriginalMergeAction1030" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Column="Expr1029" />
- </OutputList>
- <Sequence>
- <RelOp AvgRowSize="9" EstimateCPU="1E-06" EstimateIO="0.01" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Update" NodeId="4" Parallel="false" PhysicalOp="Index Update" EstimatedTotalSubtreeCost="0.0428907">
- <OutputList />
- <Update DMLRequestSort="true">
- <Object Database="[TEST]" Schema="[MySchema]" Table="[Point]" Index="[UK_MySchema_Point]" Alias="[t]" IndexKind="NonClustered" Storage="RowStore" />
- <SetPredicate>
- <ScalarOperator ScalarString="[ObjectId1035] = [TEST].[MySchema].[Point].[ObjectId] as [t].[ObjectId],[Name1036] = [TEST].[MySchema].[Point].[Name] as [t].[Name],[LocationId1037] = [TEST].[MySchema].[Point].[LocationId] as [t].[LocationId],[Region1038] = [TEST].[MySchema].[Point].[Region] as [t].[Region]">
- <ScalarExpressionList>
- <ScalarOperator>
- <MultipleAssign>
- <Assign>
- <ColumnReference Column="ObjectId1035" />
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- </Identifier>
- </ScalarOperator>
- </Assign>
- <Assign>
- <ColumnReference Column="Name1036" />
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- </Identifier>
- </ScalarOperator>
- </Assign>
- <Assign>
- <ColumnReference Column="LocationId1037" />
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- </Identifier>
- </ScalarOperator>
- </Assign>
- <Assign>
- <ColumnReference Column="Region1038" />
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- </Identifier>
- </ScalarOperator>
- </Assign>
- </MultipleAssign>
- </ScalarOperator>
- </ScalarExpressionList>
- </ScalarOperator>
- </SetPredicate>
- <ActionColumn>
- <ColumnReference Column="Action1006" />
- </ActionColumn>
- <RelOp AvgRowSize="58" EstimateCPU="2E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Collapse" NodeId="5" Parallel="false" PhysicalOp="Collapse" EstimatedTotalSubtreeCost="0.0328897">
- <OutputList>
- <ColumnReference Column="Action1006" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- </OutputList>
- <Collapse>
- <GroupBy>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- </GroupBy>
- <RelOp AvgRowSize="58" EstimateCPU="0.000100058" EstimateIO="0.0112613" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Sort" NodeId="6" Parallel="false" PhysicalOp="Sort" EstimatedTotalSubtreeCost="0.0328877">
- <OutputList>
- <ColumnReference Column="Action1006" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- </OutputList>
- <MemoryFractions Input="1" Output="1" />
- <Sort Distinct="false">
- <OrderBy>
- <OrderByColumn Ascending="true">
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- </OrderByColumn>
- <OrderByColumn Ascending="true">
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- </OrderByColumn>
- <OrderByColumn Ascending="true">
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- </OrderByColumn>
- <OrderByColumn Ascending="true">
- <ColumnReference Column="Action1006" />
- </OrderByColumn>
- </OrderBy>
- <RelOp AvgRowSize="58" EstimateCPU="7.6E-07" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Filter" NodeId="7" Parallel="false" PhysicalOp="Filter" EstimatedTotalSubtreeCost="0.0215264">
- <OutputList>
- <ColumnReference Column="Action1006" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- </OutputList>
- <Filter StartupExpression="false">
- <RelOp AvgRowSize="154" EstimateCPU="5.07784E-05" EstimateIO="0.00657783" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="2" LogicalOp="Eager Spool" NodeId="9" Parallel="false" PhysicalOp="Table Spool" EstimatedTotalSubtreeCost="0.0215256">
- <OutputList>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Column="Action1006" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Column="Expr1025" />
- <ColumnReference Column="Expr1029" />
- <ColumnReference Column="OriginalMergeAction1030" />
- </OutputList>
- <Spool>
- <RelOp AvgRowSize="154" EstimateCPU="1.5E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="2" LogicalOp="Split" NodeId="10" Parallel="false" PhysicalOp="Split" EstimatedTotalSubtreeCost="0.0297246">
- <OutputList>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Column="Action1006" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Column="Expr1025" />
- <ColumnReference Column="Expr1026" />
- <ColumnReference Column="Expr1027" />
- <ColumnReference Column="Expr1028" />
- <ColumnReference Column="Expr1029" />
- <ColumnReference Column="OriginalMergeAction1030" />
- </OutputList>
- <Split>
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Column="Action1006" />
- </DefinedValue>
- </DefinedValues>
- <ActionColumn>
- <ColumnReference Column="Action1006" />
- </ActionColumn>
- <RelOp AvgRowSize="200" EstimateCPU="1.28E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Assert" NodeId="11" Parallel="false" PhysicalOp="Assert" EstimatedTotalSubtreeCost="0.0297231">
- <OutputList>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Column="Action1006" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Column="ObjectId_OLD" />
- <ColumnReference Column="Name_OLD" />
- <ColumnReference Column="LocationId_OLD" />
- <ColumnReference Column="Region_OLD" />
- <ColumnReference Column="Expr1025" />
- <ColumnReference Column="Expr1026" />
- <ColumnReference Column="Expr1027" />
- <ColumnReference Column="Expr1028" />
- <ColumnReference Column="Expr1029" />
- <ColumnReference Column="OriginalMergeAction1030" />
- </OutputList>
- <Assert StartupExpression="false">
- <RelOp AvgRowSize="200" EstimateCPU="4.18E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Left Semi Join" NodeId="12" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.0297218">
- <OutputList>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Column="Action1006" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Column="ObjectId_OLD" />
- <ColumnReference Column="Name_OLD" />
- <ColumnReference Column="LocationId_OLD" />
- <ColumnReference Column="Region_OLD" />
- <ColumnReference Column="Expr1025" />
- <ColumnReference Column="Expr1026" />
- <ColumnReference Column="Expr1027" />
- <ColumnReference Column="Expr1028" />
- <ColumnReference Column="Expr1029" />
- <ColumnReference Column="OriginalMergeAction1030" />
- <ColumnReference Column="Expr1031" />
- <ColumnReference Column="Pass1032" />
- <ColumnReference Column="Expr1033" />
- <ColumnReference Column="Pass1034" />
- </OutputList>
- <NestedLoops Optimized="false">
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Column="Expr1033" />
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Pass1034" />
- </DefinedValue>
- </DefinedValues>
- <PassThru>
- <ScalarOperator ScalarString="[Action1006]=(3)">
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Action1006" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="(3)" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </PassThru>
- <OuterReferences>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- </OuterReferences>
- <ProbeColumn>
- <ColumnReference Column="Expr1033" />
- </ProbeColumn>
- <RelOp AvgRowSize="200" EstimateCPU="4.18E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Left Semi Join" NodeId="13" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.0264342">
- <OutputList>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Column="Action1006" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Column="ObjectId_OLD" />
- <ColumnReference Column="Name_OLD" />
- <ColumnReference Column="LocationId_OLD" />
- <ColumnReference Column="Region_OLD" />
- <ColumnReference Column="Expr1025" />
- <ColumnReference Column="Expr1026" />
- <ColumnReference Column="Expr1027" />
- <ColumnReference Column="Expr1028" />
- <ColumnReference Column="Expr1029" />
- <ColumnReference Column="OriginalMergeAction1030" />
- <ColumnReference Column="Expr1031" />
- <ColumnReference Column="Pass1032" />
- </OutputList>
- <NestedLoops Optimized="false">
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Column="Expr1031" />
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Pass1032" />
- </DefinedValue>
- </DefinedValues>
- <PassThru>
- <ScalarOperator ScalarString="[Action1006]=(3) OR [TEST].[MySchema].[Point].[LocationId] as [t].[LocationId] IS NULL">
- <Logical Operation="OR">
- <ScalarOperator>
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Action1006" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="(3)" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- <ScalarOperator>
- <Logical Operation="IS NULL">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- </Identifier>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- </PassThru>
- <OuterReferences>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- </OuterReferences>
- <ProbeColumn>
- <ColumnReference Column="Expr1031" />
- </ProbeColumn>
- <RelOp AvgRowSize="200" EstimateCPU="1E-06" EstimateIO="0.01" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Merge" NodeId="14" Parallel="false" PhysicalOp="Clustered Index Merge" EstimatedTotalSubtreeCost="0.0231463">
- <OutputList>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Column="Action1006" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Column="ObjectId_OLD" />
- <ColumnReference Column="Name_OLD" />
- <ColumnReference Column="LocationId_OLD" />
- <ColumnReference Column="Region_OLD" />
- <ColumnReference Column="Expr1025" />
- <ColumnReference Column="Expr1026" />
- <ColumnReference Column="Expr1027" />
- <ColumnReference Column="Expr1028" />
- <ColumnReference Column="Expr1029" />
- <ColumnReference Column="OriginalMergeAction1030" />
- </OutputList>
- <Update DMLRequestSort="false">
- <Object Database="[TEST]" Schema="[MySchema]" Table="[Point]" Index="[PK_MySchema_Point]" Alias="[t]" IndexKind="Clustered" Storage="RowStore" />
- <SetPredicate>
- <ScalarOperator ScalarString="[TEST].[MySchema].[Point].[Region] as [t].[Region] = [Expr1007],[TEST].[MySchema].[Point].[LocationId] as [t].[LocationId] = [Expr1009],[TEST].[MySchema].[Point].[Name] as [t].[Name] = [Expr1010]">
- <ScalarExpressionList>
- <ScalarOperator>
- <MultipleAssign>
- <Assign>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Expr1007" />
- </Identifier>
- </ScalarOperator>
- </Assign>
- <Assign>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Expr1009" />
- </Identifier>
- </ScalarOperator>
- </Assign>
- <Assign>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Expr1010" />
- </Identifier>
- </ScalarOperator>
- </Assign>
- </MultipleAssign>
- </ScalarOperator>
- </ScalarExpressionList>
- </ScalarOperator>
- </SetPredicate>
- <ActionColumn>
- <ColumnReference Column="Action1006" />
- </ActionColumn>
- <RelOp AvgRowSize="154" EstimateCPU="1E-07" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Compute Scalar" NodeId="15" Parallel="false" PhysicalOp="Compute Scalar" EstimatedTotalSubtreeCost="0.0131453">
- <OutputList>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Column="Action1006" />
- <ColumnReference Column="Expr1007" />
- <ColumnReference Column="Expr1008" />
- <ColumnReference Column="Expr1009" />
- <ColumnReference Column="Expr1010" />
- <ColumnReference Column="Expr1025" />
- <ColumnReference Column="Expr1026" />
- <ColumnReference Column="Expr1027" />
- <ColumnReference Column="Expr1028" />
- <ColumnReference Column="Expr1029" />
- <ColumnReference Column="OriginalMergeAction1030" />
- </OutputList>
- <ComputeScalar>
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ScalarOperator ScalarString="[TEST].[MySchema].[Point].[ObjectId] as [t].[ObjectId]">
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- </Identifier>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ScalarOperator ScalarString="[TEST].[MySchema].[Point].[Name] as [t].[Name]">
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- </Identifier>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ScalarOperator ScalarString="[TEST].[MySchema].[Point].[LocationId] as [t].[LocationId]">
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- </Identifier>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ScalarOperator ScalarString="[TEST].[MySchema].[Point].[Region] as [t].[Region]">
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- </Identifier>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Action1006" />
- <ScalarOperator ScalarString="[Action1006]">
- <Identifier>
- <ColumnReference Column="Action1006" />
- </Identifier>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1025" />
- <ScalarOperator ScalarString="[Expr1025]">
- <Identifier>
- <ColumnReference Column="Expr1025" />
- </Identifier>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1026" />
- <ScalarOperator ScalarString="[Expr1026]">
- <Identifier>
- <ColumnReference Column="Expr1026" />
- </Identifier>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1027" />
- <ScalarOperator ScalarString="[Expr1027]">
- <Identifier>
- <ColumnReference Column="Expr1027" />
- </Identifier>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1028" />
- <ScalarOperator ScalarString="[Expr1028]">
- <Identifier>
- <ColumnReference Column="Expr1028" />
- </Identifier>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1029" />
- <ScalarOperator ScalarString="[Expr1029]">
- <Identifier>
- <ColumnReference Column="Expr1029" />
- </Identifier>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="OriginalMergeAction1030" />
- <ScalarOperator ScalarString="[OriginalMergeAction1030]">
- <Identifier>
- <ColumnReference Column="OriginalMergeAction1030" />
- </Identifier>
- </ScalarOperator>
- </DefinedValue>
- </DefinedValues>
- <RelOp AvgRowSize="154" EstimateCPU="1E-07" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Compute Scalar" NodeId="16" Parallel="false" PhysicalOp="Compute Scalar" EstimatedTotalSubtreeCost="0.0131453">
- <OutputList>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Column="Action1006" />
- <ColumnReference Column="Expr1007" />
- <ColumnReference Column="Expr1008" />
- <ColumnReference Column="Expr1009" />
- <ColumnReference Column="Expr1010" />
- <ColumnReference Column="Expr1025" />
- <ColumnReference Column="Expr1026" />
- <ColumnReference Column="Expr1027" />
- <ColumnReference Column="Expr1028" />
- <ColumnReference Column="Expr1029" />
- <ColumnReference Column="OriginalMergeAction1030" />
- </OutputList>
- <ComputeScalar>
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Column="Expr1025" />
- <ScalarOperator ScalarString="CASE WHEN [Expr1024] AND [Expr1023] AND [Expr1021] THEN (1) ELSE (0) END">
- <IF>
- <Condition>
- <ScalarOperator>
- <Logical Operation="AND">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Expr1024" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Expr1023" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Expr1021" />
- </Identifier>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- </Condition>
- <Then>
- <ScalarOperator>
- <Const ConstValue="(1)" />
- </ScalarOperator>
- </Then>
- <Else>
- <ScalarOperator>
- <Const ConstValue="(0)" />
- </ScalarOperator>
- </Else>
- </IF>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1026" />
- <ScalarOperator ScalarString="[TEST].[MySchema].[Point].[Region] as [t].[Region]">
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- </Identifier>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1027" />
- <ScalarOperator ScalarString="[TEST].[MySchema].[Point].[ObjectId] as [t].[ObjectId]">
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- </Identifier>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1028" />
- <ScalarOperator ScalarString="[TEST].[MySchema].[Point].[LocationId] as [t].[LocationId]">
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- </Identifier>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1029" />
- <ScalarOperator ScalarString="[TEST].[MySchema].[Point].[Name] as [t].[Name]">
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- </Identifier>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="OriginalMergeAction1030" />
- <ScalarOperator ScalarString="[Action1006]">
- <Identifier>
- <ColumnReference Column="Action1006" />
- </Identifier>
- </ScalarOperator>
- </DefinedValue>
- </DefinedValues>
- <RelOp AvgRowSize="105" EstimateCPU="1E-07" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Compute Scalar" NodeId="17" Parallel="false" PhysicalOp="Compute Scalar" EstimatedTotalSubtreeCost="0.0131452">
- <OutputList>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Column="Action1006" />
- <ColumnReference Column="Expr1007" />
- <ColumnReference Column="Expr1008" />
- <ColumnReference Column="Expr1009" />
- <ColumnReference Column="Expr1010" />
- <ColumnReference Column="Expr1021" />
- <ColumnReference Column="Expr1023" />
- <ColumnReference Column="Expr1024" />
- </OutputList>
- <ComputeScalar>
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Column="Expr1007" />
- <ScalarOperator ScalarString="[TEST].[MySchema].[Region].[Id] as [i].[Id]">
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Region]" Alias="[i]" Column="Id" />
- </Identifier>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1008" />
- <ScalarOperator ScalarString="CASE WHEN [Action1006]=(4) THEN @p1.[ObjectId] as [d].[ObjectId] ELSE [TEST].[MySchema].[Point].[ObjectId] as [t].[ObjectId] END">
- <IF>
- <Condition>
- <ScalarOperator>
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Action1006" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="(4)" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Condition>
- <Then>
- <ScalarOperator>
- <Identifier>
- <ColumnReference Table="@p1" Alias="[d]" Column="ObjectId" />
- </Identifier>
- </ScalarOperator>
- </Then>
- <Else>
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- </Identifier>
- </ScalarOperator>
- </Else>
- </IF>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1009" />
- <ScalarOperator ScalarString="[TEST].[MySchema].[Location].[Id] as [z].[Id]">
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Location]" Alias="[z]" Column="Id" />
- </Identifier>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1010" />
- <ScalarOperator ScalarString="@p1.[PointName] as [d].[PointName]">
- <Identifier>
- <ColumnReference Table="@p1" Alias="[d]" Column="PointName" />
- </Identifier>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1021" />
- <ScalarOperator ScalarString="[Action1006]=(1) AND CASE WHEN [TEST].[MySchema].[Point].[Region] as [t].[Region] = [TEST].[MySchema].[Region].[Id] as [i].[Id] THEN (1) ELSE (0) END">
- <Logical Operation="AND">
- <ScalarOperator>
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Action1006" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="(1)" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- <ScalarOperator>
- <IF>
- <Condition>
- <ScalarOperator>
- <Compare CompareOp="BINARY IS">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Region]" Alias="[i]" Column="Id" />
- </Identifier>
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Condition>
- <Then>
- <ScalarOperator>
- <Const ConstValue="(1)" />
- </ScalarOperator>
- </Then>
- <Else>
- <ScalarOperator>
- <Const ConstValue="(0)" />
- </ScalarOperator>
- </Else>
- </IF>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1023" />
- <ScalarOperator ScalarString="[Action1006]=(1) AND CASE WHEN [TEST].[MySchema].[Point].[LocationId] as [t].[LocationId] = [TEST].[MySchema].[Location].[Id] as [z].[Id] THEN (1) ELSE (0) END">
- <Logical Operation="AND">
- <ScalarOperator>
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Action1006" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="(1)" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- <ScalarOperator>
- <IF>
- <Condition>
- <ScalarOperator>
- <Compare CompareOp="BINARY IS">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Location]" Alias="[z]" Column="Id" />
- </Identifier>
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Condition>
- <Then>
- <ScalarOperator>
- <Const ConstValue="(1)" />
- </ScalarOperator>
- </Then>
- <Else>
- <ScalarOperator>
- <Const ConstValue="(0)" />
- </ScalarOperator>
- </Else>
- </IF>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Column="Expr1024" />
- <ScalarOperator ScalarString="[Action1006]=(1) AND CASE WHEN [TEST].[MySchema].[Point].[Name] as [t].[Name] = @p1.[PointName] as [d].[PointName] THEN (1) ELSE (0) END">
- <Logical Operation="AND">
- <ScalarOperator>
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Action1006" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="(1)" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- <ScalarOperator>
- <IF>
- <Condition>
- <ScalarOperator>
- <Compare CompareOp="BINARY IS">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Identifier>
- <ColumnReference Table="@p1" Alias="[d]" Column="PointName" />
- </Identifier>
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Condition>
- <Then>
- <ScalarOperator>
- <Const ConstValue="(1)" />
- </ScalarOperator>
- </Then>
- <Else>
- <ScalarOperator>
- <Const ConstValue="(0)" />
- </ScalarOperator>
- </Else>
- </IF>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- </DefinedValue>
- </DefinedValues>
- <RelOp AvgRowSize="104" EstimateCPU="1E-07" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Compute Scalar" NodeId="18" Parallel="false" PhysicalOp="Compute Scalar" EstimatedTotalSubtreeCost="0.0131451">
- <OutputList>
- <ColumnReference Table="@p1" Alias="[d]" Column="ObjectId" />
- <ColumnReference Table="@p1" Alias="[d]" Column="PointName" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Region]" Alias="[i]" Column="Id" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Location]" Alias="[z]" Column="Id" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Column="Action1006" />
- </OutputList>
- <ComputeScalar ComputeSequence="true">
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Column="Action1006" />
- <ScalarOperator ScalarString="ForceOrder(CASE WHEN [TrgPrb1004] IS NOT NULL THEN (1) ELSE (4) END)">
- <Intrinsic FunctionName="ForceOrder">
- <ScalarOperator>
- <IF>
- <Condition>
- <ScalarOperator>
- <Compare CompareOp="IS NOT">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="TrgPrb1004" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="NULL" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Condition>
- <Then>
- <ScalarOperator>
- <Const ConstValue="(1)" />
- </ScalarOperator>
- </Then>
- <Else>
- <ScalarOperator>
- <Const ConstValue="(4)" />
- </ScalarOperator>
- </Else>
- </IF>
- </ScalarOperator>
- </Intrinsic>
- </ScalarOperator>
- </DefinedValue>
- </DefinedValues>
- <RelOp AvgRowSize="104" EstimateCPU="4.18E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Insert" NodeId="19" Parallel="false" PhysicalOp="Clustered Index Insert" EstimatedTotalSubtreeCost="0.013145">
- <OutputList>
- <ColumnReference Table="@p1" Alias="[d]" Column="ObjectId" />
- <ColumnReference Table="@p1" Alias="[d]" Column="PointName" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Region]" Alias="[i]" Column="Id" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Location]" Alias="[z]" Column="Id" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Column="TrgPrb1004" />
- </OutputList>
- <Update DMLRequestSort="false">
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Column="TrgPrb1004" />
- </DefinedValue>
- </DefinedValues>
- <Object Database="[TEST]" Schema="[MySchema]" Table="[Point]" Index="[PK_MySchema_Point]" Alias="[t]" IndexKind="Clustered" Storage="RowStore" />
- <SetPredicate>
- <ScalarOperator ScalarString="[TEST].[MySchema].[Point].[Region] as [t].[Region] = [TEST].[MySchema].[Region].[Id] as [i].[Id],[TEST].[MySchema].[Point].[ObjectId] as [t].[ObjectId] = @p1.[ObjectId] as [d].[ObjectId],[TEST].[MySchema].[Point].[LocationId] as [t].[LocationId] = [TEST].[MySchema].[Location].[Id] as [z].[Id],[TEST].[MySchema].[Point].[Name] as [t].[Name] = @p1.[PointName] as [d].[PointName]">
- <ScalarExpressionList>
- <ScalarOperator>
- <MultipleAssign>
- <Assign>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Region]" Alias="[i]" Column="Id" />
- </Identifier>
- </ScalarOperator>
- </Assign>
- <Assign>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ScalarOperator>
- <Identifier>
- <ColumnReference Table="@p1" Alias="[d]" Column="ObjectId" />
- </Identifier>
- </ScalarOperator>
- </Assign>
- <Assign>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Location]" Alias="[z]" Column="Id" />
- </Identifier>
- </ScalarOperator>
- </Assign>
- <Assign>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ScalarOperator>
- <Identifier>
- <ColumnReference Table="@p1" Alias="[d]" Column="PointName" />
- </Identifier>
- </ScalarOperator>
- </Assign>
- </MultipleAssign>
- </ScalarOperator>
- </ScalarExpressionList>
- </ScalarOperator>
- </SetPredicate>
- <ProbeColumn>
- <ColumnReference Column="TrgPrb1004" />
- </ProbeColumn>
- <RelOp AvgRowSize="54" EstimateCPU="4.18E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Left Outer Join" NodeId="20" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.00985766">
- <OutputList>
- <ColumnReference Table="@p1" Alias="[d]" Column="ObjectId" />
- <ColumnReference Table="@p1" Alias="[d]" Column="PointName" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Region]" Alias="[i]" Column="Id" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Location]" Alias="[z]" Column="Id" />
- </OutputList>
- <NestedLoops Optimized="false">
- <OuterReferences>
- <ColumnReference Table="@p1" Alias="[d]" Column="Location" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Region]" Alias="[i]" Column="Id" />
- </OuterReferences>
- <RelOp AvgRowSize="62" EstimateCPU="4.18E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Inner Join" NodeId="21" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.00657038">
- <OutputList>
- <ColumnReference Table="@p1" Alias="[d]" Column="ObjectId" />
- <ColumnReference Table="@p1" Alias="[d]" Column="PointName" />
- <ColumnReference Table="@p1" Alias="[d]" Column="Location" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Region]" Alias="[i]" Column="Id" />
- </OutputList>
- <NestedLoops Optimized="false">
- <OuterReferences>
- <ColumnReference Table="@p1" Alias="[d]" Column="Region" />
- </OuterReferences>
- <RelOp AvgRowSize="67" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Index Scan" NodeId="22" Parallel="false" PhysicalOp="Index Scan" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="0">
- <OutputList>
- <ColumnReference Table="@p1" Alias="[d]" Column="ObjectId" />
- <ColumnReference Table="@p1" Alias="[d]" Column="PointName" />
- <ColumnReference Table="@p1" Alias="[d]" Column="Location" />
- <ColumnReference Table="@p1" Alias="[d]" Column="Region" />
- </OutputList>
- <IndexScan Ordered="false" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Table="@p1" Alias="[d]" Column="ObjectId" />
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Table="@p1" Alias="[d]" Column="PointName" />
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Table="@p1" Alias="[d]" Column="Location" />
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Table="@p1" Alias="[d]" Column="Region" />
- </DefinedValue>
- </DefinedValues>
- <Object Table="[@p1]" Index="[UQ__#AD3019C__77168D961F01F759]" Alias="[d]" Storage="RowStore" />
- </IndexScan>
- </RelOp>
- <RelOp AvgRowSize="9" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Index Seek" NodeId="23" Parallel="false" PhysicalOp="Index Seek" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="7">
- <OutputList>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Region]" Alias="[i]" Column="Id" />
- </OutputList>
- <IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Region]" Alias="[i]" Column="Id" />
- </DefinedValue>
- </DefinedValues>
- <Object Database="[TEST]" Schema="[MySchema]" Table="[Region]" Index="[UK_MySchema_Region]" Alias="[i]" IndexKind="NonClustered" Storage="RowStore" />
- <SeekPredicates>
- <SeekPredicateNew>
- <SeekKeys>
- <Prefix ScanType="EQ">
- <RangeColumns>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Region]" Alias="[i]" Column="Name" />
- </RangeColumns>
- <RangeExpressions>
- <ScalarOperator ScalarString="@p1.[Region] as [d].[Region]">
- <Identifier>
- <ColumnReference Table="@p1" Alias="[d]" Column="Region" />
- </Identifier>
- </ScalarOperator>
- </RangeExpressions>
- </Prefix>
- </SeekKeys>
- </SeekPredicateNew>
- </SeekPredicates>
- </IndexScan>
- </RelOp>
- </NestedLoops>
- </RelOp>
- <RelOp AvgRowSize="9" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Index Seek" NodeId="24" Parallel="false" PhysicalOp="Index Seek" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="0">
- <OutputList>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Location]" Alias="[z]" Column="Id" />
- </OutputList>
- <IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Location]" Alias="[z]" Column="Id" />
- </DefinedValue>
- </DefinedValues>
- <Object Database="[TEST]" Schema="[MySchema]" Table="[Location]" Index="[UK_MySchema_Location]" Alias="[z]" IndexKind="NonClustered" Storage="RowStore" />
- <SeekPredicates>
- <SeekPredicateNew>
- <SeekKeys>
- <Prefix ScanType="EQ">
- <RangeColumns>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Location]" Alias="[z]" Column="Region" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Location]" Alias="[z]" Column="Name" />
- </RangeColumns>
- <RangeExpressions>
- <ScalarOperator ScalarString="[TEST].[MySchema].[Region].[Id] as [i].[Id]">
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Region]" Alias="[i]" Column="Id" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator ScalarString="@p1.[Location] as [d].[Location]">
- <Identifier>
- <ColumnReference Table="@p1" Alias="[d]" Column="Location" />
- </Identifier>
- </ScalarOperator>
- </RangeExpressions>
- </Prefix>
- </SeekKeys>
- </SeekPredicateNew>
- </SeekPredicates>
- </IndexScan>
- </RelOp>
- </NestedLoops>
- </RelOp>
- </Update>
- </RelOp>
- </ComputeScalar>
- </RelOp>
- </ComputeScalar>
- </RelOp>
- </ComputeScalar>
- </RelOp>
- </ComputeScalar>
- </RelOp>
- </Update>
- </RelOp>
- <RelOp AvgRowSize="9" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Clustered Index Seek" NodeId="79" Parallel="false" PhysicalOp="Clustered Index Seek" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="0">
- <OutputList />
- <IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="true" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
- <DefinedValues />
- <Object Database="[TEST]" Schema="[MySchema]" Table="[Location]" Index="[PK_MySchema_Location]" IndexKind="Clustered" Storage="RowStore" />
- <SeekPredicates>
- <SeekPredicateNew>
- <SeekKeys>
- <Prefix ScanType="EQ">
- <RangeColumns>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Location]" Column="Id" />
- </RangeColumns>
- <RangeExpressions>
- <ScalarOperator ScalarString="[TEST].[MySchema].[Point].[LocationId] as [t].[LocationId]">
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- </Identifier>
- </ScalarOperator>
- </RangeExpressions>
- </Prefix>
- </SeekKeys>
- </SeekPredicateNew>
- </SeekPredicates>
- </IndexScan>
- </RelOp>
- </NestedLoops>
- </RelOp>
- <RelOp AvgRowSize="9" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Clustered Index Seek" NodeId="80" Parallel="false" PhysicalOp="Clustered Index Seek" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="7">
- <OutputList />
- <IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="true" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
- <DefinedValues />
- <Object Database="[TEST]" Schema="[MySchema]" Table="[Region]" Index="[PK_MySchema_Region]" IndexKind="Clustered" Storage="RowStore" />
- <SeekPredicates>
- <SeekPredicateNew>
- <SeekKeys>
- <Prefix ScanType="EQ">
- <RangeColumns>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Region]" Column="Id" />
- </RangeColumns>
- <RangeExpressions>
- <ScalarOperator ScalarString="[TEST].[MySchema].[Point].[Region] as [t].[Region]">
- <Identifier>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- </Identifier>
- </ScalarOperator>
- </RangeExpressions>
- </Prefix>
- </SeekKeys>
- </SeekPredicateNew>
- </SeekPredicates>
- </IndexScan>
- </RelOp>
- </NestedLoops>
- </RelOp>
- <Predicate>
- <ScalarOperator ScalarString="CASE WHEN NOT [Pass1032] AND [Expr1031] IS NULL THEN (0) ELSE CASE WHEN NOT [Pass1034] AND [Expr1033] IS NULL THEN (1) ELSE NULL END END">
- <IF>
- <Condition>
- <ScalarOperator>
- <Logical Operation="AND">
- <ScalarOperator>
- <Logical Operation="NOT">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Pass1032" />
- </Identifier>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- <ScalarOperator>
- <Logical Operation="IS NULL">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Expr1031" />
- </Identifier>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- </Condition>
- <Then>
- <ScalarOperator>
- <Const ConstValue="(0)" />
- </ScalarOperator>
- </Then>
- <Else>
- <ScalarOperator>
- <IF>
- <Condition>
- <ScalarOperator>
- <Logical Operation="AND">
- <ScalarOperator>
- <Logical Operation="NOT">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Pass1034" />
- </Identifier>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- <ScalarOperator>
- <Logical Operation="IS NULL">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Expr1033" />
- </Identifier>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- </Condition>
- <Then>
- <ScalarOperator>
- <Const ConstValue="(1)" />
- </ScalarOperator>
- </Then>
- <Else>
- <ScalarOperator>
- <Const ConstValue="NULL" />
- </ScalarOperator>
- </Else>
- </IF>
- </ScalarOperator>
- </Else>
- </IF>
- </ScalarOperator>
- </Predicate>
- </Assert>
- </RelOp>
- </Split>
- </RelOp>
- </Spool>
- </RelOp>
- <Predicate>
- <ScalarOperator ScalarString="NOT [Expr1025]">
- <Logical Operation="NOT">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Expr1025" />
- </Identifier>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- </Predicate>
- </Filter>
- </RelOp>
- </Sort>
- </RelOp>
- </Collapse>
- </RelOp>
- </Update>
- </RelOp>
- <RelOp AvgRowSize="104" EstimateCPU="1.76E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="2" LogicalOp="Filter" NodeId="91" Parallel="false" PhysicalOp="Filter" EstimatedTotalSubtreeCost="0.0215274">
- <OutputList>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Column="Expr1029" />
- <ColumnReference Column="OriginalMergeAction1030" />
- </OutputList>
- <Filter StartupExpression="false">
- <RelOp AvgRowSize="154" EstimateCPU="5.07784E-05" EstimateIO="0.00657783" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="2" LogicalOp="Eager Spool" NodeId="93" Parallel="false" PhysicalOp="Table Spool" EstimatedTotalSubtreeCost="0.0215256">
- <OutputList>
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Column="Action1006" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="ObjectId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Name" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="LocationId" />
- <ColumnReference Database="[TEST]" Schema="[MySchema]" Table="[Point]" Alias="[t]" Column="Region" />
- <ColumnReference Column="Expr1025" />
- <ColumnReference Column="Expr1029" />
- <ColumnReference Column="OriginalMergeAction1030" />
- </OutputList>
- <Spool PrimaryNodeId="9" />
- </RelOp>
- <Predicate>
- <ScalarOperator ScalarString="[Action1006]<>(3) OR [OriginalMergeAction1030]=(3)">
- <Logical Operation="OR">
- <ScalarOperator>
- <Compare CompareOp="NE">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Action1006" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="(3)" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- <ScalarOperator>
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="OriginalMergeAction1030" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="(3)" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- </Predicate>
- </Filter>
- </RelOp>
- </Sequence>
- </RelOp>
- </ComputeScalar>
- </RelOp>
- </QueryPlan>
- </StmtSimple>
- </Statements>
- </Batch>
- </BatchSequence>
- </ShowPlanXML>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement