Skip to content

changing @@tidb_schema_cache_size to 0, TableByName miss rate 100% #59949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tiancaiamao opened this issue Mar 7, 2025 · 2 comments · Fixed by #59952
Closed

changing @@tidb_schema_cache_size to 0, TableByName miss rate 100% #59949

tiancaiamao opened this issue Mar 7, 2025 · 2 comments · Fixed by #59952
Labels
affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/minor sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@tiancaiamao
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Run some workload like sysbench point get.

First, the @@tidb_schema_cache_size = 512M, the default value.
Change it to 0, check the schema cache hit rate.

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

Hit rate near 100% or no data (infoschema v2 not used)

3. What did you see instead (Required)

Run sysbench_point_get with @@tidb_schema_cache_size = 512M
Set @@tidb_schema_cache_size = 0
Run sysbench_point_get again, the hit rate is nearly 0.

Image

4. What is your TiDB version? (Required)

master e6b4d95

@tiancaiamao tiancaiamao added affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/minor type/bug The issue is confirmed as a bug. labels Mar 7, 2025
@tiancaiamao
Copy link
Contributor Author

The user will seldom or never change the value of @@tidb_schema_cache_size, so this is not a big problem.

@jebter
Copy link

jebter commented Mar 27, 2025

Releted to issue: #50959

@jebter jebter added the sig/sql-infra SIG: SQL Infra label Apr 11, 2025
zeminzhou pushed a commit to zeminzhou/tidb that referenced this issue May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/minor sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants