Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Begin selectivity computation
Input tree:
LogOp_Select
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [tcr].rId
ScaOp_Const TI(int,ML=4) XVAR(int,Not Owned,Value=508)
Plan for computation:
CSelCalcColumnInInterval
Column: QCOL: [tcr].rId
Loaded histogram for column QCOL: [tcr].rId from stats with id 1
Selectivity: 0
Stats collection generated:
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End selectivity computation
Begin selectivity computation
Input tree:
LogOp_LeftOuterJoin
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
ScaOp_Logical x_lopAnd
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [ar].fId
ScaOp_Identifier QCOL: [tcr].fId
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [ar].bId
ScaOp_Identifier QCOL: [tcr].bId
Plan for computation:
CSelCalcSimpleJoinWithDistinctCounts (Using base cardinality)
CDVCPlanUniqueKey
CDVCPlanFilter
Overriding 0 columns
CDVCPlanLeaf
0 Multi-Column Stats, 2 Single-Column Stats, 0 Guesses
Covering multi-col stats id: 1
Loaded histogram for column QCOL: [tcr].fId from stats with id 2
Loaded histogram for column QCOL: [tcr].bId from stats with id 3
Using ambient cardinality 28 to combine distinct counts:
14
25
Combined distinct count: 27.9312
Using ambient cardinality 28 to combine distinct counts:
27.9312
Combined distinct count: 27.9312
Using ambient cardinality 28 to combine distinct counts:
14
25
Combined distinct count: 27.9312
Using ambient cardinality 28 to combine distinct counts:
27.9312
Combined distinct count: 27.9312
Using ambient cardinality 1 to combine distinct counts:
1
1
Using ambient cardinality 1 to combine distinct counts:
1
Selectivity: 4.85248e-005
Stats collection generated:
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End selectivity computation
Begin distinct values computation
Input tree:
LogOp_GbAgg OUT(QCOL: [ar].fId,QCOL: [ar].bId,COL: Expr1003 ,) BY(QCOL: [ar].fId,QCOL: [ar].bId,)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
AncOp_PrjList
AncOp_PrjEl COL: Expr1003
ScaOp_AggFunc stopMax
ScaOp_Convert int,Null,ML=4
ScaOp_Identifier QCOL: [tcr].isS
Plan for computation:
CDVCPlanRedundantOJ
Delegating to left
CDVCPlanUniqueKey
Result of computation: 20608
Stats collection generated:
CStCollGroupBy(ID=7, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End distinct values computation
Begin selectivity computation
Input tree:
LogOp_Select
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [tcr].rId
ScaOp_Const TI(int,ML=4) XVAR(int,Not Owned,Value=508)
Plan for computation:
CSelCalcColumnInInterval
Column: QCOL: [tcr].rId
Selectivity: 0
Stats collection generated:
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End selectivity computation
Begin selectivity computation
Input tree:
LogOp_LeftOuterJoin
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
ScaOp_Logical x_lopAnd
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [ar].fId
ScaOp_Identifier QCOL: [tcr].fId
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [ar].bId
ScaOp_Identifier QCOL: [tcr].bId
Plan for computation:
CSelCalcSimpleJoinWithDistinctCounts (Using base cardinality)
CDVCPlanUniqueKey
CDVCPlanFilter
Overriding 0 columns
CDVCPlanLeaf
0 Multi-Column Stats, 2 Single-Column Stats, 0 Guesses
Covering multi-col stats id: 1
Using ambient cardinality 28 to combine distinct counts:
14
25
Combined distinct count: 27.9312
Using ambient cardinality 28 to combine distinct counts:
27.9312
Combined distinct count: 27.9312
Using ambient cardinality 28 to combine distinct counts:
14
25
Combined distinct count: 27.9312
Using ambient cardinality 28 to combine distinct counts:
27.9312
Combined distinct count: 27.9312
Using ambient cardinality 1 to combine distinct counts:
1
1
Using ambient cardinality 1 to combine distinct counts:
1
Selectivity: 4.85248e-005
Stats collection generated:
CStCollOuterJoin(ID=9, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End selectivity computation
Begin distinct values computation
Input tree:
LogOp_GbAgg OUT(QCOL: [ar].fId,QCOL: [ar].bId,COL: Expr1006 ,COL: Expr1007 ,) BY(QCOL: [ar].fId,QCOL: [ar].bId,)
CStCollOuterJoin(ID=9, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
AncOp_PrjList
AncOp_PrjEl COL: Expr1006
ScaOp_AggFunc stopMin
ScaOp_Convert int,Null,ML=4
ScaOp_Identifier QCOL: [ar].isT
AncOp_PrjEl COL: Expr1007
ScaOp_AggFunc stopMax
ScaOp_Convert int,Null,ML=4
ScaOp_Identifier QCOL: [tcr].isS
Plan for computation:
CDVCPlanRedundantOJ
Delegating to left
CDVCPlanUniqueKey
Result of computation: 20608
Stats collection generated:
CStCollGroupBy(ID=10, CARD=20608)
CStCollOuterJoin(ID=9, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End distinct values computation
Begin selectivity computation
Input tree:
LogOp_Select
CStCollGroupBy(ID=10, CARD=20608)
CStCollOuterJoin(ID=9, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
ScaOp_Comp x_cmpEq
ScaOp_Identifier COL: Expr1006
ScaOp_Const TI(int,ML=4) XVAR(int,Not Owned,Value=1)
Plan for computation:
CSelCalcColumnInInterval
Column: COL: Expr1006
Loaded histogram for column QCOL: [ar].isT from stats with id 2
Selectivity: 4.85248e-005
Stats collection generated:
CStCollFilter(ID=11, CARD=1)
CStCollGroupBy(ID=10, CARD=20608)
CStCollOuterJoin(ID=9, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End selectivity computation
Begin selectivity computation
Input tree:
LogOp_Join
CStCollGroupBy(ID=7, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollFilter(ID=11, CARD=1)
CStCollGroupBy(ID=10, CARD=20608)
CStCollOuterJoin(ID=9, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [ar].fId
ScaOp_Identifier QCOL: [ar].fId
Plan for computation:
CSelCalcExpressionComparedToExpression( QCOL: [ar].fId x_cmpEq QCOL: [ar].fId )
Loaded histogram for column QCOL: [ar].bId from stats with id 3
Loaded histogram for column QCOL: [ar].fId from stats with id 1
Selectivity: 0
Stats collection generated:
CStCollJoin(ID=12, CARD=1 x_jtInner)
CStCollGroupBy(ID=7, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollFilter(ID=11, CARD=1)
CStCollGroupBy(ID=10, CARD=20608)
CStCollOuterJoin(ID=9, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End selectivity computation
Begin distinct values computation
Input tree:
LogOp_GbAgg OUT(QCOL: [ar].fId,QCOL: [ar].bId,COL: Expr1003 ,) BY(QCOL: [ar].fId,QCOL: [ar].bId,)
CStCollProject(ID=13, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
AncOp_PrjList
AncOp_PrjEl COL: Expr1003
ScaOp_AggFunc stopMax
ScaOp_Identifier COL: Expr1008
Plan for computation:
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanRedundantOJ
Delegating to left
CDVCPlanUniqueKey
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Result of computation: 20608
Stats collection generated:
CStCollGroupBy(ID=14, CARD=20608)
CStCollProject(ID=13, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End distinct values computation
Begin selectivity computation
Input tree:
LogOp_LeftOuterJoin
CStCollProject(ID=15, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
ScaOp_Logical x_lopAnd
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [ar].fId
ScaOp_Identifier QCOL: [tcr].fId
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [ar].bId
ScaOp_Identifier QCOL: [tcr].bId
Plan for computation:
CSelCalcSimpleJoinWithDistinctCounts (Using base cardinality)
CDVCPlanUniqueKey
CDVCPlanFilter
Overriding 0 columns
CDVCPlanLeaf
0 Multi-Column Stats, 2 Single-Column Stats, 0 Guesses
Covering multi-col stats id: 1
Using ambient cardinality 28 to combine distinct counts:
14
25
Combined distinct count: 27.9312
Using ambient cardinality 28 to combine distinct counts:
27.9312
Combined distinct count: 27.9312
Using ambient cardinality 28 to combine distinct counts:
14
25
Combined distinct count: 27.9312
Using ambient cardinality 28 to combine distinct counts:
27.9312
Combined distinct count: 27.9312
Using ambient cardinality 1 to combine distinct counts:
1
1
Using ambient cardinality 1 to combine distinct counts:
1
Selectivity: 4.85248e-005
Stats collection generated:
CStCollOuterJoin(ID=16, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=15, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End selectivity computation
Begin distinct values computation
Input tree:
LogOp_GbAgg OUT(QCOL: [ar].fId,QCOL: [ar].bId,COL: Expr1006 ,COL: Expr1007 ,) BY(QCOL: [ar].fId,QCOL: [ar].bId,)
CStCollProject(ID=17, CARD=20608)
CStCollOuterJoin(ID=16, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=15, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
AncOp_PrjList
AncOp_PrjEl COL: Expr1006
ScaOp_AggFunc stopMin
ScaOp_Identifier COL: Expr1009
AncOp_PrjEl COL: Expr1007
ScaOp_AggFunc stopMax
ScaOp_Identifier COL: Expr1010
Plan for computation:
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanRedundantOJ
Delegating to left
CDVCPlanUniqueKey
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Result of computation: 20608
Stats collection generated:
CStCollGroupBy(ID=18, CARD=20608)
CStCollProject(ID=17, CARD=20608)
CStCollOuterJoin(ID=16, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=15, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End distinct values computation
Begin selectivity computation
Input tree:
LogOp_Select
CStCollGroupBy(ID=18, CARD=20608)
CStCollProject(ID=17, CARD=20608)
CStCollOuterJoin(ID=16, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=15, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
ScaOp_Comp x_cmpEq
ScaOp_Identifier COL: Expr1006
ScaOp_Const TI(int,ML=4) XVAR(int,Not Owned,Value=1)
Plan for computation:
CSelCalcColumnInInterval
Column: COL: Expr1006
Selectivity: 4.85248e-005
Stats collection generated:
CStCollFilter(ID=19, CARD=1)
CStCollGroupBy(ID=18, CARD=20608)
CStCollProject(ID=17, CARD=20608)
CStCollOuterJoin(ID=16, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=15, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End selectivity computation
Begin selectivity computation
Input tree:
LogOp_Join
CStCollGroupBy(ID=14, CARD=20608)
CStCollProject(ID=13, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollFilter(ID=19, CARD=1)
CStCollGroupBy(ID=18, CARD=20608)
CStCollProject(ID=17, CARD=20608)
CStCollOuterJoin(ID=16, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=15, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [ar].fId
ScaOp_Identifier QCOL: [ar].fId
Plan for computation:
CSelCalcExpressionComparedToExpression( QCOL: [ar].fId x_cmpEq QCOL: [ar].fId )
Selectivity: 0
Stats collection generated:
CStCollJoin(ID=20, CARD=1 x_jtInner)
CStCollGroupBy(ID=14, CARD=20608)
CStCollProject(ID=13, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollFilter(ID=19, CARD=1)
CStCollGroupBy(ID=18, CARD=20608)
CStCollProject(ID=17, CARD=20608)
CStCollOuterJoin(ID=16, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=15, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End selectivity computation
Begin selectivity computation
Input tree:
LogOp_Join
CStCollGroupBy(ID=14, CARD=20608)
CStCollProject(ID=13, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=17, CARD=20608)
CStCollOuterJoin(ID=16, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=15, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [ar].fId
ScaOp_Identifier QCOL: [ar].fId
Plan for computation:
CSelCalcExpressionComparedToExpression( QCOL: [ar].fId x_cmpEq QCOL: [ar].fId )
Selectivity: 0
Stats collection generated:
CStCollJoin(ID=21, CARD=1 x_jtInner)
CStCollGroupBy(ID=14, CARD=20608)
CStCollProject(ID=13, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=17, CARD=20608)
CStCollOuterJoin(ID=16, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=15, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End selectivity computation
Begin distinct values computation
Input tree:
LogOp_GbAgg OUT(QCOL: [ar].fId,QCOL: [ar].bId,COL: Expr1003 ,QCOL: [ar].fId,QCOL: [ar].bId, ...) BY(QCOL: [ar].fId,QCOL: [ar].bId,QCOL: [ar].bId,)
CStCollJoin(ID=21, CARD=1 x_jtInner)
CStCollGroupBy(ID=14, CARD=20608)
CStCollProject(ID=13, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=17, CARD=20608)
CStCollOuterJoin(ID=16, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=15, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
AncOp_PrjList
AncOp_PrjEl COL: Expr1006
ScaOp_AggFunc stopMin
ScaOp_Identifier COL: Expr1009
AncOp_PrjEl COL: Expr1007
ScaOp_AggFunc stopMax
ScaOp_Identifier COL: Expr1010
Plan for computation:
CDVCPlanJoin
Equivalence join edges involved (by position in edge array): 0
Plan for non-join columns (Left)
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanRedundantOJ
Delegating to left
CDVCPlanLeaf
0 Multi-Column Stats, 1 Single-Column Stats, 0 Guesses
Covering multi-col stats id: 1
Plan for non-join columns (Right)
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanRedundantOJ
Delegating to left
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanLeaf
0 Multi-Column Stats, 1 Single-Column Stats, 0 Guesses
Covering multi-col stats id: 1
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Cap distinct counts using covering multi-col stats with id 1
Adjusted distinct count: 20608
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Cap distinct counts using covering multi-col stats with id 1
Adjusted distinct count: 20608
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Using ambient cardinality 1 to combine distinct counts:
20608
20608
1
Result of computation: 1
Stats collection generated:
CStCollGroupBy(ID=22, CARD=1)
CStCollJoin(ID=21, CARD=1 x_jtInner)
CStCollGroupBy(ID=14, CARD=20608)
CStCollProject(ID=13, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=17, CARD=20608)
CStCollOuterJoin(ID=16, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=15, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End distinct values computation
Begin selectivity computation
Input tree:
LogOp_Join
CStCollProject(ID=17, CARD=20608)
CStCollOuterJoin(ID=16, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=15, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=13, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [ar].fId
ScaOp_Identifier QCOL: [ar].fId
Plan for computation:
CSelCalcExpressionComparedToExpression( QCOL: [ar].fId x_cmpEq QCOL: [ar].fId )
Selectivity: 0
Stats collection generated:
CStCollJoin(ID=23, CARD=1 x_jtInner)
CStCollProject(ID=17, CARD=20608)
CStCollOuterJoin(ID=16, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=15, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=13, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End selectivity computation
Begin selectivity computation
Input tree:
LogOp_Join
CStCollFilter(ID=19, CARD=1)
CStCollGroupBy(ID=18, CARD=20608)
CStCollProject(ID=17, CARD=20608)
CStCollOuterJoin(ID=16, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=15, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=13, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [ar].fId
ScaOp_Identifier QCOL: [ar].fId
Plan for computation:
CSelCalcExpressionComparedToExpression( QCOL: [ar].fId x_cmpEq QCOL: [ar].fId )
Selectivity: 0
Stats collection generated:
CStCollJoin(ID=24, CARD=1 x_jtInner)
CStCollFilter(ID=19, CARD=1)
CStCollGroupBy(ID=18, CARD=20608)
CStCollProject(ID=17, CARD=20608)
CStCollOuterJoin(ID=16, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=15, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=13, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End selectivity computation
Begin distinct values computation
Input tree:
LogOp_GbAgg OUT(COL: IsBaseRow1000 ,QCOL: [ar].fId,QCOL: [ar].bId,QCOL: [ar].isT,COL: IsBaseRow1001 , ...) BY(QCOL: [ar].fId,QCOL: [ar].bId,QCOL: [tcr].rId,QCOL: [tcr].fId,QCOL: [tcr].bId, ...)
CStCollJoin(ID=23, CARD=1 x_jtInner)
CStCollProject(ID=17, CARD=20608)
CStCollOuterJoin(ID=16, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=15, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=13, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
AncOp_PrjList
AncOp_PrjEl COL: Expr1006
ScaOp_AggFunc stopMin
ScaOp_Identifier COL: Expr1009
AncOp_PrjEl COL: Expr1007
ScaOp_AggFunc stopMax
ScaOp_Identifier COL: Expr1010
Plan for computation:
CDVCPlanJoin
Equivalence join edges involved (by position in edge array): 0
Plan for non-join columns (Left)
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanRedundantOJ
Delegating to left
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanLeaf
0 Multi-Column Stats, 1 Single-Column Stats, 0 Guesses
Covering multi-col stats id: 1
Plan for non-join columns (Right)
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanJoin
Asymmetric join edges (left) involved (by position in edge array): 1
Asymmetric join edges (right) involved (by position in edge array): 0 1
Plan for non-join columns (Left)
CDVCPlanTrivial
Plan for non-join columns (Right)
CDVCPlanUniqueKey
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Using ambient cardinality 20608 to combine distinct counts:
1
Combined distinct count: 1
Using ambient cardinality 20607 to combine distinct counts:
1
20607
Combined distinct count: 20607
Using ambient cardinality 1 to combine distinct counts:
1
1
1
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Using ambient cardinality 1 to combine distinct counts:
20608
20608
1
Result of computation: 1
Stats collection generated:
CStCollGroupBy(ID=25, CARD=1)
CStCollJoin(ID=23, CARD=1 x_jtInner)
CStCollProject(ID=17, CARD=20608)
CStCollOuterJoin(ID=16, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=15, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=13, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End distinct values computation
Begin selectivity computation
Input tree:
LogOp_LeftOuterJoin
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
ScaOp_Logical x_lopAnd
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [tcr].fId
ScaOp_Identifier QCOL: [ar].fId
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [tcr].bId
ScaOp_Identifier QCOL: [ar].bId
Plan for computation:
CSelCalcSimpleJoinWithDistinctCounts (Using base cardinality)
CDVCPlanUniqueKey
CDVCPlanFilter
Overriding 0 columns
CDVCPlanLeaf
0 Multi-Column Stats, 2 Single-Column Stats, 0 Guesses
Covering multi-col stats id: 1
Using ambient cardinality 28 to combine distinct counts:
14
25
Combined distinct count: 27.9312
Using ambient cardinality 28 to combine distinct counts:
27.9312
Combined distinct count: 27.9312
Using ambient cardinality 28 to combine distinct counts:
14
25
Combined distinct count: 27.9312
Using ambient cardinality 28 to combine distinct counts:
27.9312
Combined distinct count: 27.9312
Using ambient cardinality 1 to combine distinct counts:
1
1
Using ambient cardinality 1 to combine distinct counts:
1
Selectivity: 4.85248e-005
Stats collection generated:
CStCollOuterJoin(ID=27, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End selectivity computation
Begin distinct values computation
Input tree:
LogOp_GbAgg OUT(QCOL: [ar].fId,QCOL: [ar].bId,COL: Expr1006 ,COL: Expr1007 ,) BY(QCOL: [ar].fId,QCOL: [ar].bId,)
CStCollProject(ID=28, CARD=20608)
CStCollOuterJoin(ID=27, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
AncOp_PrjList
AncOp_PrjEl COL: Expr1006
ScaOp_AggFunc stopMin
ScaOp_Identifier COL: Expr1009
AncOp_PrjEl COL: Expr1007
ScaOp_AggFunc stopMax
ScaOp_Identifier COL: Expr1010
Plan for computation:
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanRedundantOJ
Delegating to left
CDVCPlanUniqueKey
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Result of computation: 20608
Stats collection generated:
CStCollGroupBy(ID=29, CARD=20608)
CStCollProject(ID=28, CARD=20608)
CStCollOuterJoin(ID=27, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End distinct values computation
Begin selectivity computation
Input tree:
LogOp_Select
CStCollGroupBy(ID=29, CARD=20608)
CStCollProject(ID=28, CARD=20608)
CStCollOuterJoin(ID=27, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
ScaOp_Comp x_cmpEq
ScaOp_Identifier COL: Expr1006
ScaOp_Const TI(int,ML=4) XVAR(int,Not Owned,Value=1)
Plan for computation:
CSelCalcColumnInInterval
Column: COL: Expr1006
Selectivity: 4.85248e-005
Stats collection generated:
CStCollFilter(ID=30, CARD=1)
CStCollGroupBy(ID=29, CARD=20608)
CStCollProject(ID=28, CARD=20608)
CStCollOuterJoin(ID=27, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End selectivity computation
Begin selectivity computation
Input tree:
LogOp_Join
CStCollProject(ID=28, CARD=20608)
CStCollOuterJoin(ID=27, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=31, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [ar].fId
ScaOp_Identifier QCOL: [ar].fId
Plan for computation:
CSelCalcExpressionComparedToExpression( QCOL: [ar].fId x_cmpEq QCOL: [ar].fId )
Selectivity: 0
Stats collection generated:
CStCollJoin(ID=32, CARD=1 x_jtInner)
CStCollProject(ID=28, CARD=20608)
CStCollOuterJoin(ID=27, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=31, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End selectivity computation
Begin distinct values computation
Input tree:
LogOp_GbAgg OUT(COL: IsBaseRow1000 ,QCOL: [ar].fId,QCOL: [ar].bId,QCOL: [ar].isT,COL: IsBaseRow1001 , ...) BY(QCOL: [ar].fId,QCOL: [ar].bId,QCOL: [tcr].rId,QCOL: [tcr].fId,QCOL: [tcr].bId, ...)
CStCollJoin(ID=32, CARD=1 x_jtInner)
CStCollProject(ID=28, CARD=20608)
CStCollOuterJoin(ID=27, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=31, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
AncOp_PrjList
AncOp_PrjEl COL: Expr1006
ScaOp_AggFunc stopMin
ScaOp_Identifier COL: Expr1009
AncOp_PrjEl COL: Expr1007
ScaOp_AggFunc stopMax
ScaOp_Identifier COL: Expr1010
Plan for computation:
CDVCPlanJoin
Equivalence join edges involved (by position in edge array): 0
Plan for non-join columns (Left)
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanRedundantOJ
Delegating to left
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanLeaf
0 Multi-Column Stats, 1 Single-Column Stats, 0 Guesses
Covering multi-col stats id: 1
Plan for non-join columns (Right)
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanJoin
Asymmetric join edges (left) involved (by position in edge array): 1
Asymmetric join edges (right) involved (by position in edge array): 0 1
Plan for non-join columns (Left)
CDVCPlanTrivial
Plan for non-join columns (Right)
CDVCPlanUniqueKey
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Cap distinct counts using covering multi-col stats with id 1
Adjusted distinct count: 20608
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Using ambient cardinality 1 to combine distinct counts:
20608
20608
1
Result of computation: 1
Stats collection generated:
CStCollGroupBy(ID=33, CARD=1)
CStCollJoin(ID=32, CARD=1 x_jtInner)
CStCollProject(ID=28, CARD=20608)
CStCollOuterJoin(ID=27, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=31, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End distinct values computation
Begin selectivity computation
Input tree:
LogOp_Join
CStCollFilter(ID=30, CARD=1)
CStCollGroupBy(ID=29, CARD=20608)
CStCollProject(ID=28, CARD=20608)
CStCollOuterJoin(ID=27, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=31, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [ar].fId
ScaOp_Identifier QCOL: [ar].fId
Plan for computation:
CSelCalcExpressionComparedToExpression( QCOL: [ar].fId x_cmpEq QCOL: [ar].fId )
Selectivity: 0
Stats collection generated:
CStCollJoin(ID=34, CARD=1 x_jtInner)
CStCollFilter(ID=30, CARD=1)
CStCollGroupBy(ID=29, CARD=20608)
CStCollProject(ID=28, CARD=20608)
CStCollOuterJoin(ID=27, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=31, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End selectivity computation
Begin distinct values computation
Input tree:
LogOp_GbAgg OUT(QCOL: [ar].fId,QCOL: [ar].bId,COL: Expr1003 ,) BY(QCOL: [ar].fId,QCOL: [ar].bId,)
CStCollProject(ID=31, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
AncOp_PrjList
AncOp_PrjEl COL: Expr1003
ScaOp_AggFunc stopMax
ScaOp_Identifier COL: Expr1008
Plan for computation:
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanRedundantOJ
Delegating to left
CDVCPlanUniqueKey
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Result of computation: 20608
Stats collection generated:
CStCollGroupBy(ID=35, CARD=20608)
CStCollProject(ID=31, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End distinct values computation
Begin selectivity computation
Input tree:
LogOp_Join
CStCollGroupBy(ID=35, CARD=20608)
CStCollProject(ID=31, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=28, CARD=20608)
CStCollOuterJoin(ID=27, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [ar].fId
ScaOp_Identifier QCOL: [ar].fId
Plan for computation:
CSelCalcExpressionComparedToExpression( QCOL: [ar].fId x_cmpEq QCOL: [ar].fId )
Selectivity: 0
Stats collection generated:
CStCollJoin(ID=36, CARD=1 x_jtInner)
CStCollGroupBy(ID=35, CARD=20608)
CStCollProject(ID=31, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=28, CARD=20608)
CStCollOuterJoin(ID=27, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End selectivity computation
Begin distinct values computation
Input tree:
LogOp_GbAgg OUT(QCOL: [ar].fId,QCOL: [ar].bId,COL: Expr1003 ,QCOL: [ar].fId,QCOL: [ar].bId, ...) BY(QCOL: [ar].fId,QCOL: [ar].bId,QCOL: [ar].bId,)
CStCollJoin(ID=36, CARD=1 x_jtInner)
CStCollGroupBy(ID=35, CARD=20608)
CStCollProject(ID=31, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=28, CARD=20608)
CStCollOuterJoin(ID=27, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
AncOp_PrjList
AncOp_PrjEl COL: Expr1006
ScaOp_AggFunc stopMin
ScaOp_Identifier COL: Expr1009
AncOp_PrjEl COL: Expr1007
ScaOp_AggFunc stopMax
ScaOp_Identifier COL: Expr1010
Plan for computation:
CDVCPlanJoin
Equivalence join edges involved (by position in edge array): 0
Plan for non-join columns (Left)
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanRedundantOJ
Delegating to left
CDVCPlanLeaf
0 Multi-Column Stats, 1 Single-Column Stats, 0 Guesses
Covering multi-col stats id: 1
Plan for non-join columns (Right)
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanRedundantOJ
Delegating to left
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanLeaf
0 Multi-Column Stats, 1 Single-Column Stats, 0 Guesses
Covering multi-col stats id: 1
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Using ambient cardinality 1 to combine distinct counts:
20608
20608
1
Result of computation: 1
Stats collection generated:
CStCollGroupBy(ID=37, CARD=1)
CStCollJoin(ID=36, CARD=1 x_jtInner)
CStCollGroupBy(ID=35, CARD=20608)
CStCollProject(ID=31, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=28, CARD=20608)
CStCollOuterJoin(ID=27, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End distinct values computation
Begin selectivity computation
Input tree:
LogOp_Join
CStCollGroupBy(ID=35, CARD=20608)
CStCollProject(ID=31, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollFilter(ID=30, CARD=1)
CStCollGroupBy(ID=29, CARD=20608)
CStCollProject(ID=28, CARD=20608)
CStCollOuterJoin(ID=27, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [ar].fId
ScaOp_Identifier QCOL: [ar].fId
Plan for computation:
CSelCalcExpressionComparedToExpression( QCOL: [ar].fId x_cmpEq QCOL: [ar].fId )
Selectivity: 0
Stats collection generated:
CStCollJoin(ID=38, CARD=1 x_jtInner)
CStCollGroupBy(ID=35, CARD=20608)
CStCollProject(ID=31, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollFilter(ID=30, CARD=1)
CStCollGroupBy(ID=29, CARD=20608)
CStCollProject(ID=28, CARD=20608)
CStCollOuterJoin(ID=27, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End selectivity computation
Estimating distinct count in utility function
Input stats collection:
CStCollFilter(ID=30, CARD=1)
CStCollGroupBy(ID=29, CARD=20608)
CStCollProject(ID=28, CARD=20608)
CStCollOuterJoin(ID=27, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
Columns to distinct on:QCOL: [ar].fId
Plan for computation:
CDVCPlanFilter
Overriding 0 columns
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanRedundantOJ
Delegating to left
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanLeaf
0 Multi-Column Stats, 1 Single-Column Stats, 0 Guesses
Using ambient cardinality 20608 to combine distinct counts:
1
Combined distinct count: 1
Using ambient cardinality 20608 to combine distinct counts:
1
Combined distinct count: 1
Using ambient cardinality 20608 to combine distinct counts:
1
Combined distinct count: 1
Using ambient cardinality 1 to combine distinct counts:
1
Using ambient cardinality 1 to combine distinct counts:
1
Result of computation: 1
Estimating distinct count in utility function
Input stats collection:
CStCollGroupBy(ID=35, CARD=20608)
CStCollProject(ID=31, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
Columns to distinct on:QCOL: [ar].fId
Plan for computation:
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanRedundantOJ
Delegating to left
CDVCPlanLeaf
0 Multi-Column Stats, 1 Single-Column Stats, 0 Guesses
Using ambient cardinality 20608 to combine distinct counts:
1
Combined distinct count: 1
Using ambient cardinality 20608 to combine distinct counts:
1
Combined distinct count: 1
Using ambient cardinality 20608 to combine distinct counts:
1
Combined distinct count: 1
Result of computation: 1
Estimating distinct count in utility function
Input stats collection:
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
Columns to distinct on:QCOL: [tcr].fId QCOL: [tcr].bId
Plan for computation:
CDVCPlanFilter
Overriding 0 columns
CDVCPlanLeaf
0 Multi-Column Stats, 2 Single-Column Stats, 0 Guesses
Covering multi-col stats id: 1
Using ambient cardinality 1 to combine distinct counts:
1
1
Using ambient cardinality 1 to combine distinct counts:
1
Result of computation: 1
Estimating distinct count in utility function
Input stats collection:
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
Columns to distinct on:QCOL: [ar].fId QCOL: [ar].bId
Plan for computation:
CDVCPlanUniqueKey
Result of computation: 20608
Begin selectivity computation
Input tree:
LogOp_Join
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
ScaOp_Logical x_lopAnd
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [tcr].fId
ScaOp_Identifier QCOL: [ar].fId
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [tcr].bId
ScaOp_Identifier QCOL: [ar].bId
Plan for computation:
CSelCalcSimpleJoinWithDistinctCounts (Using base cardinality)
CDVCPlanUniqueKey
CDVCPlanFilter
Overriding 0 columns
CDVCPlanLeaf
0 Multi-Column Stats, 2 Single-Column Stats, 0 Guesses
Covering multi-col stats id: 1
Using ambient cardinality 28 to combine distinct counts:
14
25
Combined distinct count: 27.9312
Using ambient cardinality 28 to combine distinct counts:
27.9312
Combined distinct count: 27.9312
Selectivity: 4.85248e-005
Stats collection generated:
CStCollJoin(ID=43, CARD=1 x_jtInner)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End selectivity computation
Begin selectivity computation
Input tree:
LogOp_Join
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [tcr].rId
ScaOp_Const TI(int,ML=4) XVAR(int,Not Owned,Value=508)
Plan for computation:
CSelCalcOneSided (LEFT)
CSelCalcColumnInInterval
Column: QCOL: [tcr].rId
Selectivity: 0
Stats collection generated:
CStCollJoin(ID=45, CARD=1 x_jtInner)
CStCollFilter(ID=44, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
End selectivity computation
Estimating distinct count in utility function
Input stats collection:
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
Columns to distinct on:QCOL: [tcr].fId QCOL: [tcr].bId
Plan for computation:
CDVCPlanFilter
Overriding 0 columns
CDVCPlanLeaf
0 Multi-Column Stats, 2 Single-Column Stats, 0 Guesses
Covering multi-col stats id: 1
Using ambient cardinality 1 to combine distinct counts:
1
1
Using ambient cardinality 1 to combine distinct counts:
1
Result of computation: 1
Estimating distinct count in utility function
Input stats collection:
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
Columns to distinct on:QCOL: [ar].fId QCOL: [ar].bId
Plan for computation:
CDVCPlanUniqueKey
Result of computation: 20608
Begin selectivity computation
Input tree:
LogOp_Join
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
ScaOp_Logical x_lopAnd
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [tcr].fId
ScaOp_Identifier QCOL: [ar].fId
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [tcr].bId
ScaOp_Identifier QCOL: [ar].bId
Plan for computation:
CSelCalcSimpleJoinWithDistinctCounts (Using base cardinality)
CDVCPlanUniqueKey
CDVCPlanFilter
Overriding 0 columns
CDVCPlanLeaf
0 Multi-Column Stats, 2 Single-Column Stats, 0 Guesses
Covering multi-col stats id: 1
Using ambient cardinality 28 to combine distinct counts:
14
25
Combined distinct count: 27.9312
Using ambient cardinality 28 to combine distinct counts:
27.9312
Combined distinct count: 27.9312
Selectivity: 4.85248e-005
Stats collection generated:
CStCollJoin(ID=48, CARD=1 x_jtInner)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
End selectivity computation
Begin selectivity computation
Input tree:
LogOp_Join
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
ScaOp_Comp x_cmpEq
ScaOp_Identifier QCOL: [tcr].rId
ScaOp_Const TI(int,ML=4) XVAR(int,Not Owned,Value=508)
Plan for computation:
CSelCalcOneSided (LEFT)
CSelCalcColumnInInterval
Column: QCOL: [tcr].rId
Selectivity: 0
Stats collection generated:
CStCollJoin(ID=50, CARD=1 x_jtInner)
CStCollFilter(ID=49, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
End selectivity computation
Estimating distinct count in utility function
Input stats collection:
CStCollProject(ID=28, CARD=20608)
CStCollOuterJoin(ID=27, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
Columns to distinct on:QCOL: [ar].fId
Plan for computation:
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanRedundantOJ
Delegating to left
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanLeaf
0 Multi-Column Stats, 1 Single-Column Stats, 0 Guesses
Using ambient cardinality 20608 to combine distinct counts:
1
Combined distinct count: 1
Using ambient cardinality 20608 to combine distinct counts:
1
Combined distinct count: 1
Using ambient cardinality 20608 to combine distinct counts:
1
Combined distinct count: 1
Result of computation: 1
Estimating distinct count in utility function
Input stats collection:
CStCollJoin(ID=32, CARD=1 x_jtInner)
CStCollProject(ID=28, CARD=20608)
CStCollOuterJoin(ID=27, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=31, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
Columns to distinct on:QCOL: [ar].fId QCOL: [ar].bId QCOL: [tcr].rId QCOL: [tcr].fId QCOL: [tcr].bId QCOL: [tcr].isS QCOL: [ar].bId
Plan for computation:
CDVCPlanJoin
Equivalence join edges involved (by position in edge array): 0
Plan for non-join columns (Left)
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanJoin
Asymmetric join edges (left) involved (by position in edge array): 1
Asymmetric join edges (right) involved (by position in edge array): 0 1
Plan for non-join columns (Left)
CDVCPlanTrivial
Plan for non-join columns (Right)
CDVCPlanUniqueKey
Plan for non-join columns (Right)
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanRedundantOJ
Delegating to left
CDVCPlanLeaf
0 Multi-Column Stats, 1 Single-Column Stats, 0 Guesses
Using ambient cardinality 20608 to combine distinct counts:
1
Combined distinct count: 1
Using ambient cardinality 20607 to combine distinct counts:
1
20607
Combined distinct count: 20607
Using ambient cardinality 1 to combine distinct counts:
1
1
1
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Using ambient cardinality 1 to combine distinct counts:
20608
20608
1
Result of computation: 1
Estimating distinct count in utility function
Input stats collection:
CStCollProject(ID=31, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
Columns to distinct on:QCOL: [ar].fId
Plan for computation:
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanRedundantOJ
Delegating to left
CDVCPlanLeaf
0 Multi-Column Stats, 1 Single-Column Stats, 0 Guesses
Using ambient cardinality 20608 to combine distinct counts:
1
Combined distinct count: 1
Result of computation: 1
Estimating distinct count in utility function
Input stats collection:
CStCollJoin(ID=34, CARD=1 x_jtInner)
CStCollFilter(ID=30, CARD=1)
CStCollGroupBy(ID=29, CARD=20608)
CStCollProject(ID=28, CARD=20608)
CStCollOuterJoin(ID=27, CARD=20608 x_jtLeftOuter)
CStCollProject(ID=26, CARD=20608)
CStCollBaseTable(ID=3, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=8, CARD=1)
CStCollBaseTable(ID=4, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
CStCollProject(ID=31, CARD=20608)
CStCollOuterJoin(ID=6, CARD=20608 x_jtLeftOuter)
CStCollBaseTable(ID=1, CARD=20608 TBL: #SQL2014MinMaxAggregateCardinalityBug_ar AS TBL: ar)
CStCollFilter(ID=5, CARD=1)
CStCollBaseTable(ID=2, CARD=28 TBL: #SQL2014MinMaxAggregateCardinalityBug_tcr AS TBL: tcr)
Columns to distinct on:QCOL: [ar].fId QCOL: [ar].bId QCOL: [ar].bId
Plan for computation:
CDVCPlanJoin
Equivalence join edges involved (by position in edge array): 0
Plan for non-join columns (Left)
CDVCPlanFilter
Overriding 0 columns
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanRedundantOJ
Delegating to left
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanLeaf
0 Multi-Column Stats, 1 Single-Column Stats, 0 Guesses
Plan for non-join columns (Right)
CDVCPlanProjectOrGroupBy
Delegated plan:
CDVCPlanRedundantOJ
Delegating to left
CDVCPlanLeaf
0 Multi-Column Stats, 1 Single-Column Stats, 0 Guesses
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Using ambient cardinality 1 to combine distinct counts:
20608
Using ambient cardinality 1 to combine distinct counts:
1
Using ambient cardinality 20608 to combine distinct counts:
20608
Combined distinct count: 20608
Using ambient cardinality 1 to combine distinct counts:
1
20608
1
Result of computation: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.