Reduce unnecessary usage of string in tidb-server.
Open
type/enhancement
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
Function CountStmtNode call GetStmtLabel to get the type of current statement, the type returned by GetStmtLabel should use enum instead of string. Compare enum/constant integer is much faster than string.
https://github.com/pingcap/tidb/blob/eaead0238ef9724d479f272ce78ff3303cdbaf85/executor/compiler.go#L156
Contributor guide
Assessment
This issue has not been assessed yet.