pingcap / pingcap/tidb

Reduce unnecessary usage of string in tidb-server.

Open
#36,492 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

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

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.