DROP STATS can take a lot of memory for heavily partitioned tables
- 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)
I found this during development, so need to verify in master.
create a table with 8000 partitions and 20+ columns
populate with data, run ANALYZE then DROP STAT
### 2. What did you expect to see? (Required)
It succeeding removing all stats for the table
### 3. What did you see instead (Required)
Error 8175 (HY000): Your query has been cancelled due to exceeding the allowed memory limit for a single SQL query. Please try narrowing your query scope or increase the tidb_mem_quota_query limit and try again.[conn=0]
### 4. What is your TiDB version? (Required)
Contributor guide
Assessment
This issue has not been assessed yet.