pingcap / pingcap/tidb

DROP STATS can take a lot of memory for heavily partitioned tables

Open
#66,580 2 comments 0 reactions 0 assignees View on GitHub
component/tablepartition may-affects-7.1 may-affects-7.5 may-affects-8.1 may-affects-8.5 severity/major sig/sql-infra type/bug
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

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.