Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WITH a6
- AS ( SELECT cdc.col2
- ,maxLimit.col11 AS col15Rule
- ,maxLimit.col15
- FROM table1 AS cdc
- JOIN table2 AS cdt
- ON cdt.col1 = cdc.col1
- LEFT JOIN table3 AS ahcr
- ON ahcr.col9 = cdt.col1
- OUTER APPLY ( SELECT TOP 1
- rules.col11
- ,rules.col15
- FROM ( SELECT clr.col11
- ,clr.col15
- ,Priority = ROW_NUMBER() OVER ( ORDER BY clr.col2 DESC, clr.col1 DESC, clr.col10 DESC, clr.col12 DESC, clr.col13 DESC, clr.col7 DESC , clr.col14 DESC )
- FROM table4 AS clr
- WHERE ( clr.col2 IS NULL
- OR clr.col2 = cdc.col2
- )
- AND ( clr.col1 IS NULL
- OR clr.col1 = cdc.col1
- )
- AND ( clr.col10 IS NULL
- OR clr.col10 = ahcr.col10
- )
- AND ( clr.col12 IS NULL
- OR clr.col12 = cdt.col8
- )
- AND ( clr.col13 IS NULL
- OR clr.col13 = cdc.col3
- )
- AND ( clr.col7 IS NULL
- OR clr.col7 = cdc.col7
- )
- AND ( clr.col14 IS NULL
- OR clr.col14 = cdc.col5
- )
- AND clr.col15 IS NOT NULL
- ) AS rules
- WHERE rules.Priority = 1
- ) maxLimit
- WHERE cdc.col6 = 4
- )
- SELECT a1.[col2] AS [col22]
- ,a4.[col2] AS [col23]
- FROM [dbo].[table1] a1
- INNER JOIN [dbo].[table5] a2
- ON a1.[col2] = a2.[col2]
- INNER JOIN [dbo].[table6] a3
- ON a2.[col2] = a3.[col18]
- INNER JOIN [dbo].[table1] a4
- ON a3.[col19] = a4.[col2]
- INNER JOIN [dbo].[table5] a5
- ON a4.[col2] = a5.[col2]
- INNER JOIN a6
- ON a6.col2 = a4.col2
- WHERE COALESCE(a5.[col17], a5.[col16], 0) < ISNULL(a6.[col15], 0)
- AND NOT EXISTS ( SELECT 1
- FROM [dbo].[table7] a7
- WHERE a1.[col2] = a7.[col22]
- AND a4.[col2] = a7.[col23] )
- AND a1.col2 = '1234123412341234'
- OPTION (USE PLAN N'<?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.5" Build="13.0.4411.0" xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan">
- <BatchSequence>
- <Batch>
- <Statements>
- <StmtSimple StatementCompId="1" StatementEstRows="1" StatementId="1" StatementOptmLevel="FULL" StatementOptmEarlyAbortReason="GoodEnoughPlanFound" CardinalityEstimationModelVersion="130" StatementSubTreeCost="0.0442385" StatementText="WITH a6
 AS ( SELECT cdc.col2
 ,maxLimit.col11 AS col15Rule
 ,maxLimit.col15
 FROM table1 AS cdc 
 JOIN table2 AS cdt 
 ON cdt.col1 = cdc.col1
 LEFT JOIN table3 AS ahcr 
 ON ahcr.col9 = cdt.col1
 OUTER APPLY ( SELECT TOP 1
 rules.col11
 ,rules.col15
 FROM ( SELECT clr.col11
 ,clr.col15
 ,Priority = ROW_NUMBER() OVER ( ORDER BY clr.col2 DESC, clr.col1 DESC, clr.col10 DESC, clr.col12 DESC, clr.col13 DESC, clr.col7 DESC , clr.col14 DESC )
 FROM table4 AS clr 
 WHERE ( clr.col2 IS NULL
 OR clr.col2 = cdc.col2
 )
 AND ( clr.col1 IS NULL
 OR clr.col1 = cdc.col1
 )
 AND ( clr.col10 IS NULL
 OR clr.col10 = ahcr.col10
 )
 AND ( clr.col12 IS NULL
 OR clr.col12 = cdt.col8
 )
 AND ( clr.col13 IS NULL
 OR clr.col13 = cdc.col3
 )
 AND ( clr.col7 IS NULL
 OR clr.col7 = cdc.col7
 )
 AND ( clr.col14 IS NULL
 OR clr.col14 = cdc.col5
 )
 AND clr.col15 IS NOT NULL
 ) AS rules
 WHERE rules.Priority = 1
 ) maxLimit
 WHERE cdc.col6 = 4
 )
 SELECT a1.[col2] AS [col22]
 ,a4.[col2] AS [col23]
 FROM [dbo].[table1] a1 
 INNER JOIN [dbo].[table5] a2 
 ON a1.[col2] = a2.[col2]
 INNER JOIN [dbo].[table6] a3 
 ON a2.[col2] = a3.[col18]
 INNER JOIN [dbo].[table1] a4 
 ON a3.[col19] = a4.[col2]
 INNER JOIN [dbo].[table5] a5 
 ON a4.[col2] = a5.[col2]
 INNER JOIN a6 
 ON a6.col2 = a4.col2
 WHERE COALESCE(a5.[col17], a5.[col16], 0) < ISNULL(a6.[col15], 0)
 AND NOT EXISTS ( SELECT 1
 FROM [dbo].[table7] a7
 WHERE a1.[col2] = a7.[col22]
 AND a4.[col2] = a7.[col23] )
 AND a1.col2 = ''1234123412341234''" StatementType="SELECT" QueryHash="0x8E082042DBC266EA" QueryPlanHash="0x9879964BE6701F8B" RetrievedFromCache="false" SecurityPolicyApplied="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 CachedPlanSize="96" CompileTime="19" CompileCPU="19" CompileMemory="1432">
- <MemoryGrantInfo SerialRequiredMemory="512" SerialDesiredMemory="544" />
- <OptimizerHardwareDependentProperties EstimatedAvailableMemoryGrant="209715" EstimatedPagesCached="52428" EstimatedAvailableDegreeOfParallelism="2" MaxCompileMemory="6723992" />
- <RelOp AvgRowSize="63" EstimateCPU="6.8E-07" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Filter" NodeId="0" Parallel="false" PhysicalOp="Filter" EstimatedTotalSubtreeCost="0.0442385">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a1]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a4]" Column="col2" />
- </OutputList>
- <Filter StartupExpression="false">
- <RelOp AvgRowSize="79" EstimateCPU="4.18E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Left Outer Join" NodeId="1" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.0442378">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a1]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a4]" Column="col2" />
- <ColumnReference Column="Expr1011" />
- <ColumnReference Column="Expr1014" />
- </OutputList>
- <NestedLoops Optimized="false">
- <OuterReferences>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col1" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col3" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col5" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col7" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table2]" Alias="[cdt]" Column="col8" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table3]" Alias="[ahcr]" Column="col10" />
- </OuterReferences>
- <RelOp AvgRowSize="197" EstimateCPU="4.18E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Left Outer Join" NodeId="2" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.0295832">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a1]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a4]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col1" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col3" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col5" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col7" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table2]" Alias="[cdt]" Column="col8" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table3]" Alias="[ahcr]" Column="col10" />
- <ColumnReference Column="Expr1014" />
- </OutputList>
- <NestedLoops Optimized="false">
- <OuterReferences>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table2]" Alias="[cdt]" Column="col1" />
- </OuterReferences>
- <RelOp AvgRowSize="220" EstimateCPU="4.18E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Inner Join" NodeId="3" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.0262959">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a1]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a4]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col1" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col3" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col5" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col7" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table2]" Alias="[cdt]" Column="col1" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table2]" Alias="[cdt]" Column="col8" />
- <ColumnReference Column="Expr1014" />
- </OutputList>
- <NestedLoops Optimized="false">
- <OuterReferences>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col1" />
- </OuterReferences>
- <RelOp AvgRowSize="140" EstimateCPU="1E-07" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Compute Scalar" NodeId="4" Parallel="false" PhysicalOp="Compute Scalar" EstimatedTotalSubtreeCost="0.0230086">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a1]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a4]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col1" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col3" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col5" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col7" />
- <ColumnReference Column="Expr1014" />
- </OutputList>
- <ComputeScalar>
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Column="Expr1014" />
- <ScalarOperator ScalarString="CASE WHEN [Sandpit].[dbo].[table5].[col17] as [a5].[col17] IS NOT NULL THEN [Sandpit].[dbo].[table5].[col17] as [a5].[col17] ELSE CASE WHEN [Sandpit].[dbo].[table5].[col16] as [a5].[col16] IS NOT NULL THEN [Sandpit].[dbo].[table5].[col16] as [a5].[col16] ELSE ($0.0000) END END">
- <IF>
- <Condition>
- <ScalarOperator>
- <Compare CompareOp="IS NOT">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table5]" Alias="[a5]" Column="col17" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="NULL" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Condition>
- <Then>
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table5]" Alias="[a5]" Column="col17" />
- </Identifier>
- </ScalarOperator>
- </Then>
- <Else>
- <ScalarOperator>
- <IF>
- <Condition>
- <ScalarOperator>
- <Compare CompareOp="IS NOT">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table5]" Alias="[a5]" Column="col16" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="NULL" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Condition>
- <Then>
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table5]" Alias="[a5]" Column="col16" />
- </Identifier>
- </ScalarOperator>
- </Then>
- <Else>
- <ScalarOperator>
- <Const ConstValue="($0.0000)" />
- </ScalarOperator>
- </Else>
- </IF>
- </ScalarOperator>
- </Else>
- </IF>
- </ScalarOperator>
- </DefinedValue>
- </DefinedValues>
- <RelOp AvgRowSize="149" EstimateCPU="4.18E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Inner Join" NodeId="5" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.0230085">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a1]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a4]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table5]" Alias="[a5]" Column="col16" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table5]" Alias="[a5]" Column="col17" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col1" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col3" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col5" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col7" />
- </OutputList>
- <NestedLoops Optimized="false">
- <OuterReferences>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col2" />
- </OuterReferences>
- <RelOp AvgRowSize="132" EstimateCPU="4.18E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Left Anti Semi Join" NodeId="6" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.0197212">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a1]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a4]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col1" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col3" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col5" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col7" />
- </OutputList>
- <NestedLoops Optimized="false">
- <Predicate>
- <ScalarOperator ScalarString="[Sandpit].[dbo].[table1].[col2] as [a4].[col2]=[Sandpit].[dbo].[table7].[col23] as [a7].[col23]">
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a4]" Column="col2" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table7]" Alias="[a7]" Column="col23" />
- </Identifier>
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Predicate>
- <RelOp AvgRowSize="132" EstimateCPU="4.18E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Inner Join" NodeId="7" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.0164332">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a1]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a4]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col1" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col3" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col5" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col7" />
- </OutputList>
- <NestedLoops Optimized="false">
- <OuterReferences>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a4]" Column="col2" />
- </OuterReferences>
- <RelOp AvgRowSize="63" EstimateCPU="4.18E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Inner Join" NodeId="8" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.0131454">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a1]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a4]" Column="col2" />
- </OutputList>
- <NestedLoops Optimized="false">
- <RelOp AvgRowSize="9" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" EstimatedRowsRead="1" LogicalOp="Clustered Index Seek" NodeId="9" Parallel="false" PhysicalOp="Clustered Index Seek" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="0">
- <OutputList />
- <IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
- <DefinedValues />
- <Object Database="[Sandpit]" Schema="[dbo]" Table="[table5]" Index="[UCX_table5_col2]" Alias="[a2]" IndexKind="Clustered" Storage="RowStore" />
- <SeekPredicates>
- <SeekPredicateNew>
- <SeekKeys>
- <Prefix ScanType="EQ">
- <RangeColumns>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table5]" Alias="[a2]" Column="col2" />
- </RangeColumns>
- <RangeExpressions>
- <ScalarOperator ScalarString="''1234123412341234''">
- <Const ConstValue="''1234123412341234''" />
- </ScalarOperator>
- </RangeExpressions>
- </Prefix>
- </SeekKeys>
- </SeekPredicateNew>
- </SeekPredicates>
- </IndexScan>
- </RelOp>
- <RelOp AvgRowSize="63" EstimateCPU="4.18E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Inner Join" NodeId="10" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.00985814">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a1]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a4]" Column="col2" />
- </OutputList>
- <NestedLoops Optimized="false">
- <RelOp AvgRowSize="36" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" EstimatedRowsRead="1" LogicalOp="Clustered Index Seek" NodeId="11" Parallel="false" PhysicalOp="Clustered Index Seek" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="0">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a1]" Column="col2" />
- </OutputList>
- <IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a1]" Column="col2" />
- </DefinedValue>
- </DefinedValues>
- <Object Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Index="[PK_table1]" Alias="[a1]" IndexKind="Clustered" Storage="RowStore" />
- <SeekPredicates>
- <SeekPredicateNew>
- <SeekKeys>
- <Prefix ScanType="EQ">
- <RangeColumns>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a1]" Column="col2" />
- </RangeColumns>
- <RangeExpressions>
- <ScalarOperator ScalarString="''1234123412341234''">
- <Const ConstValue="''1234123412341234''" />
- </ScalarOperator>
- </RangeExpressions>
- </Prefix>
- </SeekKeys>
- </SeekPredicateNew>
- </SeekPredicates>
- </IndexScan>
- </RelOp>
- <RelOp AvgRowSize="36" EstimateCPU="4.18E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Inner Join" NodeId="12" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.00657086">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a4]" Column="col2" />
- </OutputList>
- <NestedLoops Optimized="false">
- <OuterReferences>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table6]" Alias="[a3]" Column="col19" />
- </OuterReferences>
- <RelOp AvgRowSize="63" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" EstimatedRowsRead="1" LogicalOp="Clustered Index Scan" NodeId="13" Parallel="false" PhysicalOp="Clustered Index Scan" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="0">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table6]" Alias="[a3]" Column="col19" />
- </OutputList>
- <IndexScan Ordered="false" ForcedIndex="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table6]" Alias="[a3]" Column="col19" />
- </DefinedValue>
- </DefinedValues>
- <Object Database="[Sandpit]" Schema="[dbo]" Table="[table6]" Index="[PK_table6]" Alias="[a3]" IndexKind="Clustered" Storage="RowStore" />
- <Predicate>
- <ScalarOperator ScalarString="[Sandpit].[dbo].[table6].[col18] as [a3].[col18]=''1234123412341234''">
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table6]" Alias="[a3]" Column="col18" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="''1234123412341234''" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Predicate>
- </IndexScan>
- </RelOp>
- <RelOp AvgRowSize="36" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" EstimatedRowsRead="1" LogicalOp="Clustered Index Seek" NodeId="14" Parallel="false" PhysicalOp="Clustered Index Seek" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="0">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a4]" Column="col2" />
- </OutputList>
- <IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a4]" Column="col2" />
- </DefinedValue>
- </DefinedValues>
- <Object Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Index="[PK_table1]" Alias="[a4]" IndexKind="Clustered" Storage="RowStore" />
- <SeekPredicates>
- <SeekPredicateNew>
- <SeekKeys>
- <Prefix ScanType="EQ">
- <RangeColumns>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a4]" Column="col2" />
- </RangeColumns>
- <RangeExpressions>
- <ScalarOperator ScalarString="[Sandpit].[dbo].[table6].[col19] as [a3].[col19]">
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table6]" Alias="[a3]" Column="col19" />
- </Identifier>
- </ScalarOperator>
- </RangeExpressions>
- </Prefix>
- </SeekKeys>
- </SeekPredicateNew>
- </SeekPredicates>
- </IndexScan>
- </RelOp>
- </NestedLoops>
- </RelOp>
- </NestedLoops>
- </RelOp>
- </NestedLoops>
- </RelOp>
- <RelOp AvgRowSize="80" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" EstimatedRowsRead="1" LogicalOp="Clustered Index Seek" NodeId="15" Parallel="false" PhysicalOp="Clustered Index Seek" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="0">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col1" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col3" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col5" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col7" />
- </OutputList>
- <IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col1" />
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col2" />
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col3" />
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col5" />
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col7" />
- </DefinedValue>
- </DefinedValues>
- <Object Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Index="[PK_table1]" Alias="[cdc]" IndexKind="Clustered" Storage="RowStore" />
- <SeekPredicates>
- <SeekPredicateNew>
- <SeekKeys>
- <Prefix ScanType="EQ">
- <RangeColumns>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col2" />
- </RangeColumns>
- <RangeExpressions>
- <ScalarOperator ScalarString="[Sandpit].[dbo].[table1].[col2] as [a4].[col2]">
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[a4]" Column="col2" />
- </Identifier>
- </ScalarOperator>
- </RangeExpressions>
- </Prefix>
- </SeekKeys>
- </SeekPredicateNew>
- </SeekPredicates>
- <Predicate>
- <ScalarOperator ScalarString="[Sandpit].[dbo].[table1].[col6] as [cdc].[col6]=(4)">
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col6" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="(4)" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Predicate>
- </IndexScan>
- </RelOp>
- </NestedLoops>
- </RelOp>
- <RelOp AvgRowSize="63" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" EstimatedRowsRead="1" LogicalOp="Clustered Index Scan" NodeId="16" Parallel="false" PhysicalOp="Clustered Index Scan" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="0">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table7]" Alias="[a7]" Column="col23" />
- </OutputList>
- <IndexScan Ordered="false" ForcedIndex="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table7]" Alias="[a7]" Column="col23" />
- </DefinedValue>
- </DefinedValues>
- <Object Database="[Sandpit]" Schema="[dbo]" Table="[table7]" Index="[PK_table7]" Alias="[a7]" IndexKind="Clustered" Storage="RowStore" />
- <Predicate>
- <ScalarOperator ScalarString="[Sandpit].[dbo].[table7].[col22] as [a7].[col22]=''1234123412341234''">
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table7]" Alias="[a7]" Column="col22" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="''1234123412341234''" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Predicate>
- </IndexScan>
- </RelOp>
- </NestedLoops>
- </RelOp>
- <RelOp AvgRowSize="23" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" EstimatedRowsRead="1" LogicalOp="Clustered Index Seek" NodeId="17" Parallel="false" PhysicalOp="Clustered Index Seek" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="0">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table5]" Alias="[a5]" Column="col16" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table5]" Alias="[a5]" Column="col17" />
- </OutputList>
- <IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table5]" Alias="[a5]" Column="col16" />
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table5]" Alias="[a5]" Column="col17" />
- </DefinedValue>
- </DefinedValues>
- <Object Database="[Sandpit]" Schema="[dbo]" Table="[table5]" Index="[UCX_table5_col2]" Alias="[a5]" IndexKind="Clustered" Storage="RowStore" />
- <SeekPredicates>
- <SeekPredicateNew>
- <SeekKeys>
- <Prefix ScanType="EQ">
- <RangeColumns>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table5]" Alias="[a5]" Column="col2" />
- </RangeColumns>
- <RangeExpressions>
- <ScalarOperator ScalarString="[Sandpit].[dbo].[table1].[col2] as [cdc].[col2]">
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col2" />
- </Identifier>
- </ScalarOperator>
- </RangeExpressions>
- </Prefix>
- </SeekKeys>
- </SeekPredicateNew>
- </SeekPredicates>
- </IndexScan>
- </RelOp>
- </NestedLoops>
- </RelOp>
- </ComputeScalar>
- </RelOp>
- <RelOp AvgRowSize="88" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" EstimatedRowsRead="1" LogicalOp="Clustered Index Seek" NodeId="18" Parallel="false" PhysicalOp="Clustered Index Seek" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="0">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table2]" Alias="[cdt]" Column="col1" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table2]" Alias="[cdt]" Column="col8" />
- </OutputList>
- <IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table2]" Alias="[cdt]" Column="col1" />
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table2]" Alias="[cdt]" Column="col8" />
- </DefinedValue>
- </DefinedValues>
- <Object Database="[Sandpit]" Schema="[dbo]" Table="[table2]" Index="[PK_table2]" Alias="[cdt]" IndexKind="Clustered" Storage="RowStore" />
- <SeekPredicates>
- <SeekPredicateNew>
- <SeekKeys>
- <Prefix ScanType="EQ">
- <RangeColumns>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table2]" Alias="[cdt]" Column="col1" />
- </RangeColumns>
- <RangeExpressions>
- <ScalarOperator ScalarString="[Sandpit].[dbo].[table1].[col1] as [cdc].[col1]">
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col1" />
- </Identifier>
- </ScalarOperator>
- </RangeExpressions>
- </Prefix>
- </SeekKeys>
- </SeekPredicateNew>
- </SeekPredicates>
- </IndexScan>
- </RelOp>
- </NestedLoops>
- </RelOp>
- <RelOp AvgRowSize="11" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" EstimatedRowsRead="1" LogicalOp="Clustered Index Seek" NodeId="19" Parallel="false" PhysicalOp="Clustered Index Seek" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="0">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table3]" Alias="[ahcr]" Column="col10" />
- </OutputList>
- <IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table3]" Alias="[ahcr]" Column="col10" />
- </DefinedValue>
- </DefinedValues>
- <Object Database="[Sandpit]" Schema="[dbo]" Table="[table3]" Index="[PK_table3]" Alias="[ahcr]" IndexKind="Clustered" Storage="RowStore" />
- <SeekPredicates>
- <SeekPredicateNew>
- <SeekKeys>
- <Prefix ScanType="EQ">
- <RangeColumns>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table3]" Alias="[ahcr]" Column="col9" />
- </RangeColumns>
- <RangeExpressions>
- <ScalarOperator ScalarString="[Sandpit].[dbo].[table2].[col1] as [cdt].[col1]">
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table2]" Alias="[cdt]" Column="col1" />
- </Identifier>
- </ScalarOperator>
- </RangeExpressions>
- </Prefix>
- </SeekKeys>
- </SeekPredicateNew>
- </SeekPredicates>
- </IndexScan>
- </RelOp>
- </NestedLoops>
- </RelOp>
- <RelOp AvgRowSize="15" EstimateCPU="1E-07" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Top" NodeId="20" Parallel="false" PhysicalOp="Top" EstimatedTotalSubtreeCost="0.0146505">
- <OutputList>
- <ColumnReference Column="Expr1011" />
- </OutputList>
- <Top RowCount="false" IsPercent="false" WithTies="false">
- <TopExpression>
- <ScalarOperator ScalarString="(1)">
- <Const ConstValue="(1)" />
- </ScalarOperator>
- </TopExpression>
- <RelOp AvgRowSize="15" EstimateCPU="4.8E-07" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Filter" NodeId="21" Parallel="false" PhysicalOp="Filter" EstimatedTotalSubtreeCost="0.0146504">
- <OutputList>
- <ColumnReference Column="Expr1011" />
- </OutputList>
- <Filter StartupExpression="false">
- <RelOp AvgRowSize="23" EstimateCPU="1E-07" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Compute Scalar" NodeId="22" Parallel="false" PhysicalOp="Compute Scalar" EstimatedTotalSubtreeCost="0.0146499">
- <OutputList>
- <ColumnReference Column="Expr1009" />
- <ColumnReference Column="Expr1011" />
- </OutputList>
- <ComputeScalar>
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Column="Expr1011" />
- <ScalarOperator ScalarString="[Sandpit].[dbo].[table4].[col15] as [clr].[col15]">
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col15" />
- </Identifier>
- </ScalarOperator>
- </DefinedValue>
- </DefinedValues>
- <RelOp AvgRowSize="23" EstimateCPU="1E-07" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Top" NodeId="23" Parallel="false" PhysicalOp="Top" EstimatedTotalSubtreeCost="0.0146498">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col15" />
- <ColumnReference Column="Expr1009" />
- </OutputList>
- <Top RowCount="false" IsPercent="false" WithTies="false">
- <TopExpression>
- <ScalarOperator ScalarString="CASE WHEN (1) IS NULL OR (1)<(0) THEN (0) ELSE (1) END">
- <IF>
- <Condition>
- <ScalarOperator>
- <Logical Operation="OR">
- <ScalarOperator>
- <Compare CompareOp="IS">
- <ScalarOperator>
- <Const ConstValue="(1)" />
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="NULL" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- <ScalarOperator>
- <Compare CompareOp="LT">
- <ScalarOperator>
- <Const ConstValue="(1)" />
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="(0)" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- </Condition>
- <Then>
- <ScalarOperator>
- <Const ConstValue="(0)" />
- </ScalarOperator>
- </Then>
- <Else>
- <ScalarOperator>
- <Const ConstValue="(1)" />
- </ScalarOperator>
- </Else>
- </IF>
- </ScalarOperator>
- </TopExpression>
- <RelOp AvgRowSize="23" EstimateCPU="8E-08" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Compute Scalar" NodeId="24" Parallel="false" PhysicalOp="Sequence Project" EstimatedTotalSubtreeCost="0.0146497">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col15" />
- <ColumnReference Column="Expr1009" />
- </OutputList>
- <SequenceProject>
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Column="Expr1009" />
- <ScalarOperator ScalarString="row_number">
- <Sequence FunctionName="row_number" />
- </ScalarOperator>
- </DefinedValue>
- </DefinedValues>
- <RelOp AvgRowSize="23" EstimateCPU="2E-08" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Segment" NodeId="25" Parallel="false" PhysicalOp="Segment" EstimatedTotalSubtreeCost="0.0146496">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col1" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col10" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col12" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col13" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col7" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col15" />
- <ColumnReference Column="Segment1015" />
- </OutputList>
- <Segment>
- <GroupBy />
- <SegmentColumn>
- <ColumnReference Column="Segment1015" />
- </SegmentColumn>
- <RelOp AvgRowSize="137" EstimateCPU="0.000100137" EstimateIO="0.0112613" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Sort" NodeId="26" Parallel="false" PhysicalOp="Sort" EstimatedTotalSubtreeCost="0.0146496">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col1" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col10" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col12" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col13" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col7" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col15" />
- </OutputList>
- <MemoryFractions Input="1" Output="1" />
- <Sort Distinct="false">
- <OrderBy>
- <OrderByColumn Ascending="false">
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col2" />
- </OrderByColumn>
- <OrderByColumn Ascending="false">
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col1" />
- </OrderByColumn>
- <OrderByColumn Ascending="false">
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col10" />
- </OrderByColumn>
- <OrderByColumn Ascending="false">
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col12" />
- </OrderByColumn>
- <OrderByColumn Ascending="false">
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col13" />
- </OrderByColumn>
- <OrderByColumn Ascending="false">
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col7" />
- </OrderByColumn>
- </OrderBy>
- <RelOp AvgRowSize="142" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" EstimatedRowsRead="1" LogicalOp="Clustered Index Scan" NodeId="27" Parallel="false" PhysicalOp="Clustered Index Scan" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="0">
- <OutputList>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col2" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col1" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col10" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col12" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col13" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col7" />
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col15" />
- </OutputList>
- <IndexScan Ordered="false" ForcedIndex="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
- <DefinedValues>
- <DefinedValue>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col2" />
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col1" />
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col10" />
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col12" />
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col13" />
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col7" />
- </DefinedValue>
- <DefinedValue>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col15" />
- </DefinedValue>
- </DefinedValues>
- <Object Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Index="[PK_table4]" Alias="[clr]" IndexKind="Clustered" Storage="RowStore" />
- <Predicate>
- <ScalarOperator ScalarString="[Sandpit].[dbo].[table4].[col15] as [clr].[col15] IS NOT NULL AND [Sandpit].[dbo].[table4].[col14] as [clr].[col14]=[Sandpit].[dbo].[table1].[col5] as [cdc].[col5] AND ([Sandpit].[dbo].[table4].[col2] as [clr].[col2] IS NULL OR [Sandpit].[dbo].[table4].[col2] as [clr].[col2]=[Sandpit].[dbo].[table1].[col2] as [cdc].[col2]) AND ([Sandpit].[dbo].[table4].[col1] as [clr].[col1] IS NULL OR [Sandpit].[dbo].[table4].[col1] as [clr].[col1]=[Sandpit].[dbo].[table1].[col1] as [cdc].[col1]) AND ([Sandpit].[dbo].[table4].[col10] as [clr].[col10] IS NULL OR [Sandpit].[dbo].[table4].[col10] as [clr].[col10]=[Sandpit].[dbo].[table3].[col10] as [ahcr].[col10]) AND ([Sandpit].[dbo].[table4].[col12] as [clr].[col12] IS NULL OR [Sandpit].[dbo].[table4].[col12] as [clr].[col12]=[Sandpit].[dbo].[table2].[col8] as [cdt].[col8]) AND ([Sandpit].[dbo].[table4].[col13] as [clr].[col13] IS NULL OR [Sandpit].[dbo].[table4].[col13] as [clr].[col13]=[Sandpit].[dbo].[table1].[col3] as [cdc].[col3]) AND ([Sandpit].[dbo].[table4].[col7] as [clr].[col7] IS NULL OR [Sandpit].[dbo].[table4].[col7] as [clr].[col7]=[Sandpit].[dbo].[table1].[col7] as [cdc].[col7])">
- <Logical Operation="AND">
- <ScalarOperator>
- <Compare CompareOp="IS NOT">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col15" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="NULL" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- <ScalarOperator>
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col14" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col5" />
- </Identifier>
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- <ScalarOperator>
- <Logical Operation="OR">
- <ScalarOperator>
- <Compare CompareOp="IS">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col2" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="NULL" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- <ScalarOperator>
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col2" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col2" />
- </Identifier>
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- <ScalarOperator>
- <Logical Operation="OR">
- <ScalarOperator>
- <Compare CompareOp="IS">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col1" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="NULL" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- <ScalarOperator>
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col1" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col1" />
- </Identifier>
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- <ScalarOperator>
- <Logical Operation="OR">
- <ScalarOperator>
- <Compare CompareOp="IS">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col10" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="NULL" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- <ScalarOperator>
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col10" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table3]" Alias="[ahcr]" Column="col10" />
- </Identifier>
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- <ScalarOperator>
- <Logical Operation="OR">
- <ScalarOperator>
- <Compare CompareOp="IS">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col12" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="NULL" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- <ScalarOperator>
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col12" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table2]" Alias="[cdt]" Column="col8" />
- </Identifier>
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- <ScalarOperator>
- <Logical Operation="OR">
- <ScalarOperator>
- <Compare CompareOp="IS">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col13" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="NULL" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- <ScalarOperator>
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col13" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col3" />
- </Identifier>
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- <ScalarOperator>
- <Logical Operation="OR">
- <ScalarOperator>
- <Compare CompareOp="IS">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col7" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="NULL" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- <ScalarOperator>
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table4]" Alias="[clr]" Column="col7" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Identifier>
- <ColumnReference Database="[Sandpit]" Schema="[dbo]" Table="[table1]" Alias="[cdc]" Column="col7" />
- </Identifier>
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- </Logical>
- </ScalarOperator>
- </Predicate>
- </IndexScan>
- </RelOp>
- </Sort>
- </RelOp>
- </Segment>
- </RelOp>
- </SequenceProject>
- </RelOp>
- </Top>
- </RelOp>
- </ComputeScalar>
- </RelOp>
- <Predicate>
- <ScalarOperator ScalarString="[Expr1009]=(1)">
- <Compare CompareOp="EQ">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Expr1009" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="(1)" />
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Predicate>
- </Filter>
- </RelOp>
- </Top>
- </RelOp>
- </NestedLoops>
- </RelOp>
- <Predicate>
- <ScalarOperator ScalarString="[Expr1014]<isnull([Expr1011],($0.0000))">
- <Compare CompareOp="LT">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Expr1014" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Intrinsic FunctionName="isnull">
- <ScalarOperator>
- <Identifier>
- <ColumnReference Column="Expr1011" />
- </Identifier>
- </ScalarOperator>
- <ScalarOperator>
- <Const ConstValue="($0.0000)" />
- </ScalarOperator>
- </Intrinsic>
- </ScalarOperator>
- </Compare>
- </ScalarOperator>
- </Predicate>
- </Filter>
- </RelOp>
- </QueryPlan>
- </StmtSimple>
- </Statements>
- </Batch>
- </BatchSequence>
- </ShowPlanXML>');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement