pingcap / pingcap/tidb

statistics_stats_cache metric is wrong in millions tables scenario

Open
#58,196 0 comments 0 reactions 1 assignee Claimed by @hawkingrei View on GitHub
affects-8.5 component/statistics severity/moderate sig/planner 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)

set @@global.tidb_stats_cache_mem_quota=4GB
million tables and run dml for long time
![Image](https://github.com/user-attachments/assets/82929ae9-baca-4460-aff6-6dd6fc1eb3ff)
the actual stats cache is about 7GB
![Image](https://github.com/user-attachments/assets/7b704885-aaee-4b45-858c-c9ba67235cdf)

### 2. What did you expect to see? (Required)

### 3. What did you see instead (Required)

### 4. What is your TiDB version? (Required)

Release Version: v8.5.0-alpha-318-g7e34efa5b7
Edition: Community
Git Commit Hash: 7e34efa5b7ed3532d14170a3b2aca1090ffa20a7
Git Branch: HEAD
UTC Build Time: 2024-12-11 07:29:27
GoVersion: go1.23.4
Race Enabled: false
Check Table Before Drop: false
Store: tikv

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.