pingcap / pingcap/tidb

don't allocate the `usedStatsInfo` for each statements in a session

Open
#59,019 0 comments 0 reactions 0 assignees View on GitHub
type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement

The memory allocated by `GetUsedInfo` can be re-used for each statements in a single session. It can improve the performance of index usage a little (but not significantly).

![Image](https://github.com/user-attachments/assets/e8adf972-fb6d-4eb6-b38e-1368ebbd7ff4)

This is the CPU profile.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.