Skip to content

Commit

Permalink
executor: fix an issue that index_lookup_hash_join incorrectly estima…
Browse files Browse the repository at this point in the history
…te memory usage. (pingcap#47795) (pingcap#47920)

close pingcap#47788
  • Loading branch information
ti-chi-bot authored Oct 23, 2023
1 parent a099a2a commit 1ebb9b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion executor/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -4137,7 +4137,7 @@ func buildKvRangesForIndexJoin(ctx sessionctx.Context, tableID, indexID int64, l
memTracker.Consume(int64(2 * cap(kvRanges[0].StartKey) * len(kvRanges)))
}
if len(tmpDatumRanges) != 0 && memTracker != nil {
memTracker.Consume(2 * int64(len(tmpDatumRanges)) * types.EstimatedMemUsage(tmpDatumRanges[0].LowVal, len(tmpDatumRanges)))
memTracker.Consume(2 * types.EstimatedMemUsage(tmpDatumRanges[0].LowVal, len(tmpDatumRanges)))
}
if cwc == nil {
sort.Slice(kvRanges, func(i, j int) bool {
Expand Down

0 comments on commit 1ebb9b2

Please sign in to comment.