TiDB oom when analyzing table and the cpu load is high
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
1. deploy a cluster, tidb using 8C 16G
2. set the analyze mem quota and analyze version
```sql
set global tidb_mem_quota_analyze = 5368709120; -- (5G)
set global tidb_analyze_version = 2;
```
3. create a table has about 160 columns, and init 5000w data
4. run workload update and insert the data for 12h
### 2. What did you expect to see? (Required)
the tidb can work stably
### 3. What did you see instead (Required)
tidb will oom and restart while doing analyze

### 4. What is your TiDB version? (Required)
v6.2.0
Contributor guide
Assessment
This issue has not been assessed yet.