By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
500000 rows affected
500000 rows affected
500000 rows affected
| Microsoft SQL Server 2005 XML Showplan |
|---|
| <ShowPlanXML xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan" Version="1.481" Build="14.0.3335.7"><BatchSequence><Batch><Statements><StmtSimple StatementText="-- rowgoal set
SELECT TOP(5) r1.*
FROM dbo.RowGoals1 r1
INNER JOIN dbo.RowGoals2 r2
ON r1.id = r2.id2
INNER JOIN dbo.RowGoals2 r2_2 on 
r2.id = r2_2.id2
INNER JOIN dbo.RowGoals3 r3
ON r3.id = r2.id
WHERE r3.id2 > 50000
AND r2_2.val LIKE 'val999%'" StatementId="1" StatementCompId="1" StatementType="SELECT" RetrievedFromCache="false" StatementSubTreeCost="1.64031" StatementEstRows="5" SecurityPolicyApplied="false" StatementOptmLevel="FULL" QueryHash="0x472DBC5C71210FD1" QueryPlanHash="0xC98B341522CD573F" CardinalityEstimationModelVersion="140"><StatementSetOptions QUOTED_IDENTIFIER="true" ARITHABORT="true" CONCAT_NULL_YIELDS_NULL="true" ANSI_NULLS="true" ANSI_PADDING="true" ANSI_WARNINGS="true" NUMERIC_ROUNDABORT="false"></StatementSetOptions><QueryPlan NonParallelPlanReason="NoParallelPlansInDesktopOrExpressEdition" CachedPlanSize="40" CompileTime="1421" CompileCPU="1375" CompileMemory="784"><MemoryGrantInfo SerialRequiredMemory="0" SerialDesiredMemory="0"></MemoryGrantInfo><OptimizerHardwareDependentProperties EstimatedAvailableMemoryGrant="838808" EstimatedPagesCached="52425" EstimatedAvailableDegreeOfParallelism="1" MaxCompileMemory="1086184"></OptimizerHardwareDependentProperties><OptimizerStatsUsage><StatisticsInfo LastUpdate="2021-05-26T05:51:13.03" ModificationCount="0" SamplingPercent="40.8856" Statistics="[_WA_Sys_00000002_38996AB5]" Table="[RowGoals3]" Schema="[dbo]" Database="[fiddle_008505b283c74c1da26c5257e91e09b2]"></StatisticsInfo><StatisticsInfo LastUpdate="2021-05-26T05:51:13.20" ModificationCount="0" SamplingPercent="40.8856" Statistics="[PK__RowGoals__3213E83F8AEBF8C0]" Table="[RowGoals3]" Schema="[dbo]" Database="[fiddle_008505b283c74c1da26c5257e91e09b2]"></StatisticsInfo><StatisticsInfo LastUpdate="2021-05-26T05:51:12.64" ModificationCount="0" SamplingPercent="41.1468" Statistics="[_WA_Sys_00000003_36B12243]" Table="[RowGoals2]" Schema="[dbo]" Database="[fiddle_008505b283c74c1da26c5257e91e09b2]"></StatisticsInfo><StatisticsInfo LastUpdate="2021-05-26T05:51:11.99" ModificationCount="0" SamplingPercent="51.9316" Statistics="[PK__RowGoals__3213E83FAF9CF558]" Table="[RowGoals1]" Schema="[dbo]" Database="[fiddle_008505b283c74c1da26c5257e91e09b2]"></StatisticsInfo><StatisticsInfo LastUpdate="2021-05-26T05:51:12.80" ModificationCount="0" SamplingPercent="41.1468" Statistics="[PK__RowGoals__3213E83F73ECF155]" Table="[RowGoals2]" Schema="[dbo]" Database="[fiddle_008505b283c74c1da26c5257e91e09b2]"></StatisticsInfo><StatisticsInfo LastUpdate="2021-05-26T05:51:12.20" ModificationCount="0" SamplingPercent="41.1468" Statistics="[_WA_Sys_00000002_36B12243]" Table="[RowGoals2]" Schema="[dbo]" Database="[fiddle_008505b283c74c1da26c5257e91e09b2]"></StatisticsInfo></OptimizerStatsUsage><TraceFlags IsCompileTime="1"><TraceFlag Value="460" Scope="Global"></TraceFlag><TraceFlag Value="8017" Scope="Global"></TraceFlag></TraceFlags><RelOp NodeId="0" PhysicalOp="Top" LogicalOp="Top" EstimateRows="5" EstimateIO="0" EstimateCPU="5e-007" AvgRowSize="142" EstimatedTotalSubtreeCost="1.64031" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="id"></ColumnReference><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="val"></ColumnReference></OutputList><Top RowCount="0" IsPercent="0" WithTies="0"><TopExpression><ScalarOperator ScalarString="(5)"><Const ConstValue="(5)"></Const></ScalarOperator></TopExpression><RelOp NodeId="1" PhysicalOp="Nested Loops" LogicalOp="Inner Join" EstimateRows="5" EstimateRowsWithoutRowGoal="9.4199" EstimateIO="0" EstimateCPU="3.93752e-005" AvgRowSize="142" EstimatedTotalSubtreeCost="1.64031" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="id"></ColumnReference><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="val"></ColumnReference></OutputList><NestedLoops Optimized="0"><OuterReferences><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2]" Column="id2"></ColumnReference></OuterReferences><RelOp NodeId="2" PhysicalOp="Nested Loops" LogicalOp="Inner Join" EstimateRows="5" EstimateRowsWithoutRowGoal="9.4199" EstimateIO="0" EstimateCPU="3.93752e-005" AvgRowSize="11" EstimatedTotalSubtreeCost="1.62527" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2]" Column="id2"></ColumnReference></OutputList><NestedLoops Optimized="0"><OuterReferences><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Alias="[r3]" Column="id"></ColumnReference></OuterReferences><RelOp NodeId="3" PhysicalOp="Nested Loops" LogicalOp="Inner Join" EstimateRows="5" EstimateRowsWithoutRowGoal="9.4199" EstimateIO="0" EstimateCPU="4.41954e-005" AvgRowSize="11" EstimatedTotalSubtreeCost="1.61023" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Alias="[r3]" Column="id"></ColumnReference></OutputList><NestedLoops Optimized="0"><OuterReferences><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2_2]" Column="id2"></ColumnReference></OuterReferences><RelOp NodeId="4" PhysicalOp="Clustered Index Scan" LogicalOp="Clustered Index Scan" EstimateRows="5.61209" EstimateRowsWithoutRowGoal="10.5731" EstimatedRowsRead="500000" EstimateIO="2.00609" EstimateCPU="0.550157" AvgRowSize="142" EstimatedTotalSubtreeCost="1.35837" TableCardinality="500000" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2_2]" Column="id2"></ColumnReference></OutputList><IndexScan Ordered="0" ForcedIndex="0" ForceScan="0" NoExpandHint="0" Storage="RowStore"><DefinedValues><DefinedValue><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2_2]" Column="id2"></ColumnReference></DefinedValue></DefinedValues><Object Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Index="[PK__RowGoals__3213E83F73ECF155]" Alias="[r2_2]" IndexKind="Clustered" Storage="RowStore"></Object><Predicate><ScalarOperator ScalarString="[fiddle_008505b283c74c1da26c5257e91e09b2].[dbo].[RowGoals2].[val] as [r2_2].[val] like 'val999%'"><Intrinsic FunctionName="like"><ScalarOperator><Identifier><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2_2]" Column="val"></ColumnReference></Identifier></ScalarOperator><ScalarOperator><Const ConstValue="'val999%'"></Const></ScalarOperator></Intrinsic></ScalarOperator></Predicate></IndexScan></RelOp><RelOp NodeId="5" PhysicalOp="Clustered Index Seek" LogicalOp="Clustered Index Seek" EstimateRows="1" EstimatedRowsRead="1" EstimateIO="0.003125" EstimateCPU="0.0001581" AvgRowSize="15" EstimatedTotalSubtreeCost="0.03154" TableCardinality="500000" Parallel="0" EstimateRebinds="9.57305" EstimateRewinds="7.14799e-006" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Alias="[r3]" Column="id"></ColumnReference></OutputList><IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" ForceSeek="0" ForceScan="0" NoExpandHint="0" Storage="RowStore"><DefinedValues><DefinedValue><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Alias="[r3]" Column="id"></ColumnReference></DefinedValue></DefinedValues><Object Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Index="[PK__RowGoals__3213E83F8AEBF8C0]" Alias="[r3]" IndexKind="Clustered" Storage="RowStore"></Object><SeekPredicates><SeekPredicateNew><SeekKeys><Prefix ScanType="EQ"><RangeColumns><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Alias="[r3]" Column="id"></ColumnReference></RangeColumns><RangeExpressions><ScalarOperator ScalarString="[fiddle_008505b283c74c1da26c5257e91e09b2].[dbo].[RowGoals2].[id2] as [r2_2].[id2]"><Identifier><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2_2]" Column="id2"></ColumnReference></Identifier></ScalarOperator></RangeExpressions></Prefix></SeekKeys></SeekPredicateNew></SeekPredicates><Predicate><ScalarOperator ScalarString="[fiddle_008505b283c74c1da26c5257e91e09b2].[dbo].[RowGoals3].[id2] as [r3].[id2]>(50000)"><Compare CompareOp="GT"><ScalarOperator><Identifier><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Alias="[r3]" Column="id2"></ColumnReference></Identifier></ScalarOperator><ScalarOperator><Const ConstValue="(50000)"></Const></ScalarOperator></Compare></ScalarOperator></Predicate></IndexScan></RelOp></NestedLoops></RelOp><RelOp NodeId="6" PhysicalOp="Clustered Index Seek" LogicalOp="Clustered Index Seek" EstimateRows="1" EstimatedRowsRead="1" EstimateIO="0.003125" EstimateCPU="0.0001581" AvgRowSize="11" EstimatedTotalSubtreeCost="0.0158314" TableCardinality="500000" Parallel="0" EstimateRebinds="4.77712" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2]" Column="id2"></ColumnReference></OutputList><IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" ForceSeek="0" ForceScan="0" NoExpandHint="0" Storage="RowStore"><DefinedValues><DefinedValue><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2]" Column="id2"></ColumnReference></DefinedValue></DefinedValues><Object Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Index="[PK__RowGoals__3213E83F73ECF155]" Alias="[r2]" IndexKind="Clustered" Storage="RowStore"></Object><SeekPredicates><SeekPredicateNew><SeekKeys><Prefix ScanType="EQ"><RangeColumns><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2]" Column="id"></ColumnReference></RangeColumns><RangeExpressions><ScalarOperator ScalarString="[fiddle_008505b283c74c1da26c5257e91e09b2].[dbo].[RowGoals3].[id] as [r3].[id]"><Identifier><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Alias="[r3]" Column="id"></ColumnReference></Identifier></ScalarOperator></RangeExpressions></Prefix></SeekKeys></SeekPredicateNew></SeekPredicates></IndexScan></RelOp></NestedLoops></RelOp><RelOp NodeId="7" PhysicalOp="Clustered Index Seek" LogicalOp="Clustered Index Seek" EstimateRows="1" EstimatedRowsRead="1" EstimateIO="0.003125" EstimateCPU="0.0001581" AvgRowSize="142" EstimatedTotalSubtreeCost="0.0158284" TableCardinality="500000" Parallel="0" EstimateRebinds="4.77712" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="id"></ColumnReference><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="val"></ColumnReference></OutputList><IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" ForceSeek="0" ForceScan="0" NoExpandHint="0" Storage="RowStore"><DefinedValues><DefinedValue><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="id"></ColumnReference></DefinedValue><DefinedValue><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="val"></ColumnReference></DefinedValue></DefinedValues><Object Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Index="[PK__RowGoals__3213E83FAF9CF558]" Alias="[r1]" IndexKind="Clustered" Storage="RowStore"></Object><SeekPredicates><SeekPredicateNew><SeekKeys><Prefix ScanType="EQ"><RangeColumns><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="id"></ColumnReference></RangeColumns><RangeExpressions><ScalarOperator ScalarString="[fiddle_008505b283c74c1da26c5257e91e09b2].[dbo].[RowGoals2].[id2] as [r2].[id2]"><Identifier><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2]" Column="id2"></ColumnReference></Identifier></ScalarOperator></RangeExpressions></Prefix></SeekKeys></SeekPredicateNew></SeekPredicates></IndexScan></RelOp></NestedLoops></RelOp></Top></RelOp></QueryPlan></StmtSimple></Statements></Batch></BatchSequence></ShowPlanXML> |
| Microsoft SQL Server 2005 XML Showplan |
|---|
| <ShowPlanXML xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan" Version="1.481" Build="14.0.3335.7"><BatchSequence><Batch><Statements><StmtSimple StatementText="-- disable row goal with hint
SELECT TOP(5) r1.*
FROM dbo.RowGoals1 r1
INNER JOIN dbo.RowGoals2 r2
ON r1.id = r2.id2
INNER JOIN dbo.RowGoals2 r2_2 on 
r2.id = r2_2.id2
INNER JOIN dbo.RowGoals3 r3
ON r3.id = r2.id
WHERE r3.id2 > 50000
AND r2_2.val LIKE 'val999%'
OPTION(USE HINT('DISABLE_OPTIMIZER_ROWGOAL'))" StatementId="1" StatementCompId="1" StatementType="SELECT" RetrievedFromCache="false" StatementSubTreeCost="1.64282" StatementEstRows="5" SecurityPolicyApplied="false" StatementOptmLevel="FULL" QueryHash="0xA45C57AE1F1E47E4" QueryPlanHash="0xC98B341522CD573F" CardinalityEstimationModelVersion="140"><StatementSetOptions QUOTED_IDENTIFIER="true" ARITHABORT="true" CONCAT_NULL_YIELDS_NULL="true" ANSI_NULLS="true" ANSI_PADDING="true" ANSI_WARNINGS="true" NUMERIC_ROUNDABORT="false"></StatementSetOptions><QueryPlan NonParallelPlanReason="NoParallelPlansInDesktopOrExpressEdition" CachedPlanSize="40" CompileTime="15" CompileCPU="15" CompileMemory="776"><MemoryGrantInfo SerialRequiredMemory="0" SerialDesiredMemory="0"></MemoryGrantInfo><OptimizerHardwareDependentProperties EstimatedAvailableMemoryGrant="838808" EstimatedPagesCached="52425" EstimatedAvailableDegreeOfParallelism="1" MaxCompileMemory="1086184"></OptimizerHardwareDependentProperties><OptimizerStatsUsage><StatisticsInfo LastUpdate="2021-05-26T05:51:13.03" ModificationCount="0" SamplingPercent="40.8856" Statistics="[_WA_Sys_00000002_38996AB5]" Table="[RowGoals3]" Schema="[dbo]" Database="[fiddle_008505b283c74c1da26c5257e91e09b2]"></StatisticsInfo><StatisticsInfo LastUpdate="2021-05-26T05:51:13.20" ModificationCount="0" SamplingPercent="40.8856" Statistics="[PK__RowGoals__3213E83F8AEBF8C0]" Table="[RowGoals3]" Schema="[dbo]" Database="[fiddle_008505b283c74c1da26c5257e91e09b2]"></StatisticsInfo><StatisticsInfo LastUpdate="2021-05-26T05:51:12.64" ModificationCount="0" SamplingPercent="41.1468" Statistics="[_WA_Sys_00000003_36B12243]" Table="[RowGoals2]" Schema="[dbo]" Database="[fiddle_008505b283c74c1da26c5257e91e09b2]"></StatisticsInfo><StatisticsInfo LastUpdate="2021-05-26T05:51:11.99" ModificationCount="0" SamplingPercent="51.9316" Statistics="[PK__RowGoals__3213E83FAF9CF558]" Table="[RowGoals1]" Schema="[dbo]" Database="[fiddle_008505b283c74c1da26c5257e91e09b2]"></StatisticsInfo><StatisticsInfo LastUpdate="2021-05-26T05:51:12.80" ModificationCount="0" SamplingPercent="41.1468" Statistics="[PK__RowGoals__3213E83F73ECF155]" Table="[RowGoals2]" Schema="[dbo]" Database="[fiddle_008505b283c74c1da26c5257e91e09b2]"></StatisticsInfo><StatisticsInfo LastUpdate="2021-05-26T05:51:12.20" ModificationCount="0" SamplingPercent="41.1468" Statistics="[_WA_Sys_00000002_36B12243]" Table="[RowGoals2]" Schema="[dbo]" Database="[fiddle_008505b283c74c1da26c5257e91e09b2]"></StatisticsInfo></OptimizerStatsUsage><TraceFlags IsCompileTime="1"><TraceFlag Value="460" Scope="Global"></TraceFlag><TraceFlag Value="8017" Scope="Global"></TraceFlag></TraceFlags><RelOp NodeId="0" PhysicalOp="Top" LogicalOp="Top" EstimateRows="5" EstimateIO="0" EstimateCPU="5e-007" AvgRowSize="142" EstimatedTotalSubtreeCost="1.64282" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="id"></ColumnReference><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="val"></ColumnReference></OutputList><Top RowCount="0" IsPercent="0" WithTies="0"><TopExpression><ScalarOperator ScalarString="(5)"><Const ConstValue="(5)"></Const></ScalarOperator></TopExpression><RelOp NodeId="1" PhysicalOp="Nested Loops" LogicalOp="Inner Join" EstimateRows="9.4199" EstimateIO="0" EstimateCPU="3.93752e-005" AvgRowSize="142" EstimatedTotalSubtreeCost="1.64282" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="id"></ColumnReference><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="val"></ColumnReference></OutputList><NestedLoops Optimized="0"><OuterReferences><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2]" Column="id2"></ColumnReference></OuterReferences><RelOp NodeId="2" PhysicalOp="Nested Loops" LogicalOp="Inner Join" EstimateRows="9.4199" EstimateIO="0" EstimateCPU="3.93752e-005" AvgRowSize="11" EstimatedTotalSubtreeCost="1.64282" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2]" Column="id2"></ColumnReference></OutputList><NestedLoops Optimized="0"><OuterReferences><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Alias="[r3]" Column="id"></ColumnReference></OuterReferences><RelOp NodeId="3" PhysicalOp="Nested Loops" LogicalOp="Inner Join" EstimateRows="9.4199" EstimateIO="0" EstimateCPU="4.41954e-005" AvgRowSize="11" EstimatedTotalSubtreeCost="1.64282" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Alias="[r3]" Column="id"></ColumnReference></OutputList><NestedLoops Optimized="0"><OuterReferences><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2_2]" Column="id2"></ColumnReference></OuterReferences><RelOp NodeId="4" PhysicalOp="Clustered Index Scan" LogicalOp="Clustered Index Scan" EstimateRows="10.5731" EstimatedRowsRead="500000" EstimateIO="2.00609" EstimateCPU="0.550157" AvgRowSize="142" EstimatedTotalSubtreeCost="1.64282" TableCardinality="500000" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2_2]" Column="id2"></ColumnReference></OutputList><IndexScan Ordered="0" ForcedIndex="0" ForceScan="0" NoExpandHint="0" Storage="RowStore"><DefinedValues><DefinedValue><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2_2]" Column="id2"></ColumnReference></DefinedValue></DefinedValues><Object Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Index="[PK__RowGoals__3213E83F73ECF155]" Alias="[r2_2]" IndexKind="Clustered" Storage="RowStore"></Object><Predicate><ScalarOperator ScalarString="[fiddle_008505b283c74c1da26c5257e91e09b2].[dbo].[RowGoals2].[val] as [r2_2].[val] like 'val999%'"><Intrinsic FunctionName="like"><ScalarOperator><Identifier><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2_2]" Column="val"></ColumnReference></Identifier></ScalarOperator><ScalarOperator><Const ConstValue="'val999%'"></Const></ScalarOperator></Intrinsic></ScalarOperator></Predicate></IndexScan></RelOp><RelOp NodeId="5" PhysicalOp="Clustered Index Seek" LogicalOp="Clustered Index Seek" EstimateRows="1" EstimatedRowsRead="1" EstimateIO="0.003125" EstimateCPU="0.0001581" AvgRowSize="15" EstimatedTotalSubtreeCost="0.03154" TableCardinality="500000" Parallel="0" EstimateRebinds="9.57305" EstimateRewinds="7.14799e-006" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Alias="[r3]" Column="id"></ColumnReference></OutputList><IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" ForceSeek="0" ForceScan="0" NoExpandHint="0" Storage="RowStore"><DefinedValues><DefinedValue><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Alias="[r3]" Column="id"></ColumnReference></DefinedValue></DefinedValues><Object Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Index="[PK__RowGoals__3213E83F8AEBF8C0]" Alias="[r3]" IndexKind="Clustered" Storage="RowStore"></Object><SeekPredicates><SeekPredicateNew><SeekKeys><Prefix ScanType="EQ"><RangeColumns><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Alias="[r3]" Column="id"></ColumnReference></RangeColumns><RangeExpressions><ScalarOperator ScalarString="[fiddle_008505b283c74c1da26c5257e91e09b2].[dbo].[RowGoals2].[id2] as [r2_2].[id2]"><Identifier><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2_2]" Column="id2"></ColumnReference></Identifier></ScalarOperator></RangeExpressions></Prefix></SeekKeys></SeekPredicateNew></SeekPredicates><Predicate><ScalarOperator ScalarString="[fiddle_008505b283c74c1da26c5257e91e09b2].[dbo].[RowGoals3].[id2] as [r3].[id2]>(50000)"><Compare CompareOp="GT"><ScalarOperator><Identifier><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Alias="[r3]" Column="id2"></ColumnReference></Identifier></ScalarOperator><ScalarOperator><Const ConstValue="(50000)"></Const></ScalarOperator></Compare></ScalarOperator></Predicate></IndexScan></RelOp></NestedLoops></RelOp><RelOp NodeId="6" PhysicalOp="Clustered Index Seek" LogicalOp="Clustered Index Seek" EstimateRows="1" EstimatedRowsRead="1" EstimateIO="0.003125" EstimateCPU="0.0001581" AvgRowSize="11" EstimatedTotalSubtreeCost="0.0277654" TableCardinality="500000" Parallel="0" EstimateRebinds="8.4199" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2]" Column="id2"></ColumnReference></OutputList><IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" ForceSeek="0" ForceScan="0" NoExpandHint="0" Storage="RowStore"><DefinedValues><DefinedValue><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2]" Column="id2"></ColumnReference></DefinedValue></DefinedValues><Object Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Index="[PK__RowGoals__3213E83F73ECF155]" Alias="[r2]" IndexKind="Clustered" Storage="RowStore"></Object><SeekPredicates><SeekPredicateNew><SeekKeys><Prefix ScanType="EQ"><RangeColumns><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2]" Column="id"></ColumnReference></RangeColumns><RangeExpressions><ScalarOperator ScalarString="[fiddle_008505b283c74c1da26c5257e91e09b2].[dbo].[RowGoals3].[id] as [r3].[id]"><Identifier><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Alias="[r3]" Column="id"></ColumnReference></Identifier></ScalarOperator></RangeExpressions></Prefix></SeekKeys></SeekPredicateNew></SeekPredicates></IndexScan></RelOp></NestedLoops></RelOp><RelOp NodeId="7" PhysicalOp="Clustered Index Seek" LogicalOp="Clustered Index Seek" EstimateRows="1" EstimatedRowsRead="1" EstimateIO="0.003125" EstimateCPU="0.0001581" AvgRowSize="142" EstimatedTotalSubtreeCost="0.027755" TableCardinality="500000" Parallel="0" EstimateRebinds="8.4199" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="id"></ColumnReference><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="val"></ColumnReference></OutputList><IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" ForceSeek="0" ForceScan="0" NoExpandHint="0" Storage="RowStore"><DefinedValues><DefinedValue><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="id"></ColumnReference></DefinedValue><DefinedValue><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="val"></ColumnReference></DefinedValue></DefinedValues><Object Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Index="[PK__RowGoals__3213E83FAF9CF558]" Alias="[r1]" IndexKind="Clustered" Storage="RowStore"></Object><SeekPredicates><SeekPredicateNew><SeekKeys><Prefix ScanType="EQ"><RangeColumns><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="id"></ColumnReference></RangeColumns><RangeExpressions><ScalarOperator ScalarString="[fiddle_008505b283c74c1da26c5257e91e09b2].[dbo].[RowGoals2].[id2] as [r2].[id2]"><Identifier><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2]" Column="id2"></ColumnReference></Identifier></ScalarOperator></RangeExpressions></Prefix></SeekKeys></SeekPredicateNew></SeekPredicates></IndexScan></RelOp></NestedLoops></RelOp></Top></RelOp></QueryPlan></StmtSimple></Statements></Batch></BatchSequence></ShowPlanXML> |
| Microsoft SQL Server 2005 XML Showplan |
|---|
| <ShowPlanXML xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan" Version="1.481" Build="14.0.3335.7"><BatchSequence><Batch><Statements><StmtSimple StatementText="--Disable row goal with nonsensical top()µ

SELECT TOP(5) *
FROM
(
SELECT TOP(9999999999) r1.*
FROM dbo.RowGoals1 r1
INNER JOIN dbo.RowGoals2 r2
ON r1.id = r2.id2
INNER JOIN dbo.RowGoals2 r2_2 on 
r2.id = r2_2.id2
INNER JOIN dbo.RowGoals3 r3
ON r3.id = r2.id
WHERE r3.id2 > 50000
AND r2_2.val LIKE 'val999%'
) AS A" StatementId="1" StatementCompId="1" StatementType="SELECT" RetrievedFromCache="false" StatementSubTreeCost="1.64282" StatementEstRows="5" SecurityPolicyApplied="false" StatementOptmLevel="FULL" QueryHash="0xFE816EF22FABA5B4" QueryPlanHash="0x26010EF900503E6F" CardinalityEstimationModelVersion="140"><StatementSetOptions QUOTED_IDENTIFIER="true" ARITHABORT="true" CONCAT_NULL_YIELDS_NULL="true" ANSI_NULLS="true" ANSI_PADDING="true" ANSI_WARNINGS="true" NUMERIC_ROUNDABORT="false"></StatementSetOptions><QueryPlan NonParallelPlanReason="NoParallelPlansInDesktopOrExpressEdition" CachedPlanSize="40" CompileTime="15" CompileCPU="15" CompileMemory="792"><MemoryGrantInfo SerialRequiredMemory="0" SerialDesiredMemory="0"></MemoryGrantInfo><OptimizerHardwareDependentProperties EstimatedAvailableMemoryGrant="838808" EstimatedPagesCached="52425" EstimatedAvailableDegreeOfParallelism="1" MaxCompileMemory="1086184"></OptimizerHardwareDependentProperties><OptimizerStatsUsage><StatisticsInfo LastUpdate="2021-05-26T05:51:13.03" ModificationCount="0" SamplingPercent="40.8856" Statistics="[_WA_Sys_00000002_38996AB5]" Table="[RowGoals3]" Schema="[dbo]" Database="[fiddle_008505b283c74c1da26c5257e91e09b2]"></StatisticsInfo><StatisticsInfo LastUpdate="2021-05-26T05:51:13.20" ModificationCount="0" SamplingPercent="40.8856" Statistics="[PK__RowGoals__3213E83F8AEBF8C0]" Table="[RowGoals3]" Schema="[dbo]" Database="[fiddle_008505b283c74c1da26c5257e91e09b2]"></StatisticsInfo><StatisticsInfo LastUpdate="2021-05-26T05:51:12.64" ModificationCount="0" SamplingPercent="41.1468" Statistics="[_WA_Sys_00000003_36B12243]" Table="[RowGoals2]" Schema="[dbo]" Database="[fiddle_008505b283c74c1da26c5257e91e09b2]"></StatisticsInfo><StatisticsInfo LastUpdate="2021-05-26T05:51:11.99" ModificationCount="0" SamplingPercent="51.9316" Statistics="[PK__RowGoals__3213E83FAF9CF558]" Table="[RowGoals1]" Schema="[dbo]" Database="[fiddle_008505b283c74c1da26c5257e91e09b2]"></StatisticsInfo><StatisticsInfo LastUpdate="2021-05-26T05:51:12.80" ModificationCount="0" SamplingPercent="41.1468" Statistics="[PK__RowGoals__3213E83F73ECF155]" Table="[RowGoals2]" Schema="[dbo]" Database="[fiddle_008505b283c74c1da26c5257e91e09b2]"></StatisticsInfo><StatisticsInfo LastUpdate="2021-05-26T05:51:12.20" ModificationCount="0" SamplingPercent="41.1468" Statistics="[_WA_Sys_00000002_36B12243]" Table="[RowGoals2]" Schema="[dbo]" Database="[fiddle_008505b283c74c1da26c5257e91e09b2]"></StatisticsInfo></OptimizerStatsUsage><TraceFlags IsCompileTime="1"><TraceFlag Value="460" Scope="Global"></TraceFlag><TraceFlag Value="8017" Scope="Global"></TraceFlag></TraceFlags><RelOp NodeId="0" PhysicalOp="Top" LogicalOp="Top" EstimateRows="5" EstimateIO="0" EstimateCPU="5e-007" AvgRowSize="142" EstimatedTotalSubtreeCost="1.64282" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="id"></ColumnReference><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="val"></ColumnReference></OutputList><Top RowCount="0" IsPercent="0" WithTies="0"><TopExpression><ScalarOperator ScalarString="(5)"><Const ConstValue="(5)"></Const></ScalarOperator></TopExpression><RelOp NodeId="1" PhysicalOp="Top" LogicalOp="Top" EstimateRows="5" EstimateRowsWithoutRowGoal="9.4199" EstimateIO="0" EstimateCPU="9.4199e-007" AvgRowSize="142" EstimatedTotalSubtreeCost="1.64282" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="id"></ColumnReference><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="val"></ColumnReference></OutputList><Top RowCount="0" IsPercent="0" WithTies="0"><TopExpression><ScalarOperator ScalarString="(9999999999)"><Const ConstValue="(9999999999)"></Const></ScalarOperator></TopExpression><RelOp NodeId="2" PhysicalOp="Nested Loops" LogicalOp="Inner Join" EstimateRows="9.4199" EstimateRowsWithoutRowGoal="9.4199" EstimateIO="0" EstimateCPU="3.93752e-005" AvgRowSize="142" EstimatedTotalSubtreeCost="1.64282" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="id"></ColumnReference><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="val"></ColumnReference></OutputList><NestedLoops Optimized="0"><OuterReferences><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2]" Column="id2"></ColumnReference></OuterReferences><RelOp NodeId="3" PhysicalOp="Nested Loops" LogicalOp="Inner Join" EstimateRows="9.4199" EstimateIO="0" EstimateCPU="3.93752e-005" AvgRowSize="11" EstimatedTotalSubtreeCost="1.64282" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2]" Column="id2"></ColumnReference></OutputList><NestedLoops Optimized="0"><OuterReferences><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Alias="[r3]" Column="id"></ColumnReference></OuterReferences><RelOp NodeId="4" PhysicalOp="Nested Loops" LogicalOp="Inner Join" EstimateRows="9.4199" EstimateIO="0" EstimateCPU="4.41954e-005" AvgRowSize="11" EstimatedTotalSubtreeCost="1.64282" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Alias="[r3]" Column="id"></ColumnReference></OutputList><NestedLoops Optimized="0"><OuterReferences><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2_2]" Column="id2"></ColumnReference></OuterReferences><RelOp NodeId="5" PhysicalOp="Clustered Index Scan" LogicalOp="Clustered Index Scan" EstimateRows="10.5731" EstimatedRowsRead="500000" EstimateIO="2.00609" EstimateCPU="0.550157" AvgRowSize="142" EstimatedTotalSubtreeCost="1.64282" TableCardinality="500000" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2_2]" Column="id2"></ColumnReference></OutputList><IndexScan Ordered="0" ForcedIndex="0" ForceScan="0" NoExpandHint="0" Storage="RowStore"><DefinedValues><DefinedValue><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2_2]" Column="id2"></ColumnReference></DefinedValue></DefinedValues><Object Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Index="[PK__RowGoals__3213E83F73ECF155]" Alias="[r2_2]" IndexKind="Clustered" Storage="RowStore"></Object><Predicate><ScalarOperator ScalarString="[fiddle_008505b283c74c1da26c5257e91e09b2].[dbo].[RowGoals2].[val] as [r2_2].[val] like 'val999%'"><Intrinsic FunctionName="like"><ScalarOperator><Identifier><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2_2]" Column="val"></ColumnReference></Identifier></ScalarOperator><ScalarOperator><Const ConstValue="'val999%'"></Const></ScalarOperator></Intrinsic></ScalarOperator></Predicate></IndexScan></RelOp><RelOp NodeId="6" PhysicalOp="Clustered Index Seek" LogicalOp="Clustered Index Seek" EstimateRows="1" EstimatedRowsRead="1" EstimateIO="0.003125" EstimateCPU="0.0001581" AvgRowSize="15" EstimatedTotalSubtreeCost="0.03154" TableCardinality="500000" Parallel="0" EstimateRebinds="9.57305" EstimateRewinds="7.14799e-006" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Alias="[r3]" Column="id"></ColumnReference></OutputList><IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" ForceSeek="0" ForceScan="0" NoExpandHint="0" Storage="RowStore"><DefinedValues><DefinedValue><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Alias="[r3]" Column="id"></ColumnReference></DefinedValue></DefinedValues><Object Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Index="[PK__RowGoals__3213E83F8AEBF8C0]" Alias="[r3]" IndexKind="Clustered" Storage="RowStore"></Object><SeekPredicates><SeekPredicateNew><SeekKeys><Prefix ScanType="EQ"><RangeColumns><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Alias="[r3]" Column="id"></ColumnReference></RangeColumns><RangeExpressions><ScalarOperator ScalarString="[fiddle_008505b283c74c1da26c5257e91e09b2].[dbo].[RowGoals2].[id2] as [r2_2].[id2]"><Identifier><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2_2]" Column="id2"></ColumnReference></Identifier></ScalarOperator></RangeExpressions></Prefix></SeekKeys></SeekPredicateNew></SeekPredicates><Predicate><ScalarOperator ScalarString="[fiddle_008505b283c74c1da26c5257e91e09b2].[dbo].[RowGoals3].[id2] as [r3].[id2]>(50000)"><Compare CompareOp="GT"><ScalarOperator><Identifier><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Alias="[r3]" Column="id2"></ColumnReference></Identifier></ScalarOperator><ScalarOperator><Const ConstValue="(50000)"></Const></ScalarOperator></Compare></ScalarOperator></Predicate></IndexScan></RelOp></NestedLoops></RelOp><RelOp NodeId="7" PhysicalOp="Clustered Index Seek" LogicalOp="Clustered Index Seek" EstimateRows="1" EstimatedRowsRead="1" EstimateIO="0.003125" EstimateCPU="0.0001581" AvgRowSize="11" EstimatedTotalSubtreeCost="0.0277654" TableCardinality="500000" Parallel="0" EstimateRebinds="8.4199" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2]" Column="id2"></ColumnReference></OutputList><IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" ForceSeek="0" ForceScan="0" NoExpandHint="0" Storage="RowStore"><DefinedValues><DefinedValue><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2]" Column="id2"></ColumnReference></DefinedValue></DefinedValues><Object Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Index="[PK__RowGoals__3213E83F73ECF155]" Alias="[r2]" IndexKind="Clustered" Storage="RowStore"></Object><SeekPredicates><SeekPredicateNew><SeekKeys><Prefix ScanType="EQ"><RangeColumns><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2]" Column="id"></ColumnReference></RangeColumns><RangeExpressions><ScalarOperator ScalarString="[fiddle_008505b283c74c1da26c5257e91e09b2].[dbo].[RowGoals3].[id] as [r3].[id]"><Identifier><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals3]" Alias="[r3]" Column="id"></ColumnReference></Identifier></ScalarOperator></RangeExpressions></Prefix></SeekKeys></SeekPredicateNew></SeekPredicates></IndexScan></RelOp></NestedLoops></RelOp><RelOp NodeId="8" PhysicalOp="Clustered Index Seek" LogicalOp="Clustered Index Seek" EstimateRows="1" EstimatedRowsRead="1" EstimateIO="0.003125" EstimateCPU="0.0001581" AvgRowSize="142" EstimatedTotalSubtreeCost="0.027755" TableCardinality="500000" Parallel="0" EstimateRebinds="8.4199" EstimateRewinds="0" EstimatedExecutionMode="Row"><OutputList><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="id"></ColumnReference><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="val"></ColumnReference></OutputList><IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" ForceSeek="0" ForceScan="0" NoExpandHint="0" Storage="RowStore"><DefinedValues><DefinedValue><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="id"></ColumnReference></DefinedValue><DefinedValue><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="val"></ColumnReference></DefinedValue></DefinedValues><Object Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Index="[PK__RowGoals__3213E83FAF9CF558]" Alias="[r1]" IndexKind="Clustered" Storage="RowStore"></Object><SeekPredicates><SeekPredicateNew><SeekKeys><Prefix ScanType="EQ"><RangeColumns><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals1]" Alias="[r1]" Column="id"></ColumnReference></RangeColumns><RangeExpressions><ScalarOperator ScalarString="[fiddle_008505b283c74c1da26c5257e91e09b2].[dbo].[RowGoals2].[id2] as [r2].[id2]"><Identifier><ColumnReference Database="[fiddle_008505b283c74c1da26c5257e91e09b2]" Schema="[dbo]" Table="[RowGoals2]" Alias="[r2]" Column="id2"></ColumnReference></Identifier></ScalarOperator></RangeExpressions></Prefix></SeekKeys></SeekPredicateNew></SeekPredicates></IndexScan></RelOp></NestedLoops></RelOp></Top></RelOp></Top></RelOp></QueryPlan></StmtSimple></Statements></Batch></BatchSequence></ShowPlanXML> |