Skip to content

Commit d1a637d

Browse files
committed
adjust index covereage adjustment
1 parent cdba178 commit d1a637d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/memo/coster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func (c *coster) costRel(ctx *sql.Context, n RelExpr, s sql.StatsProvider) (floa
136136
expectedRightRows := selfJoinCard * matchRate
137137

138138
if expectedRightRows < lBest {
139-
return lBest*(seqIOCostFactor) + (lBest+1+indexCoverageAdjustment(n.Lookup))*(cpuCostFactor+randIOCostFactor), nil
139+
return lBest*(seqIOCostFactor) + (lBest+indexCoverageAdjustment(n.Lookup))*(cpuCostFactor+randIOCostFactor), nil
140140
}
141141

142142
// Estimate for reading each left row and each expected right row

0 commit comments

Comments
 (0)