Skip to content

Commit

Permalink
planner: fix incorrect estRows with global index and json column (pin…
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkingrei authored Sep 6, 2024
1 parent 4dc8f3d commit dd18083
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 2 deletions.
6 changes: 5 additions & 1 deletion pkg/statistics/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,11 @@ func (coll *HistColl) GetScaledRealtimeAndModifyCnt(idxStats *Index) (realtimeCn
if analyzeRowCount <= 0 {
return coll.RealtimeCount, coll.ModifyCount
}
scale := idxStats.TotalRowCount() / analyzeRowCount
idxTotalRowCount := idxStats.TotalRowCount()
if idxTotalRowCount <= 0 {
return coll.RealtimeCount, coll.ModifyCount
}
scale := idxTotalRowCount / analyzeRowCount
return int64(float64(coll.RealtimeCount) * scale), int64(float64(coll.ModifyCount) * scale)
}

Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit dd18083

Please sign in to comment.