pingcap / pingcap/tidb

execute “show full tables from schema like table_name” slowly

Open
#64,515 1 comment 0 reactions 0 assignees View on GitHub
affects-8.5 component/ddl contribution first-time-contributor severity/moderate type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report TiDB 8.5.3
execute “show full tables from schema like table_name” ,It takes 0.46 s for TiDB to return,MySQL is 0.01s;The entire database contains 3000 tables, and initialization takes a long time,MySQL only takes a few minutes;

![Image](https://github.com/user-attachments/assets/f5b0b7e2-247f-41b3-b1d6-4afecdd106ed)

![Image](https://github.com/user-attachments/assets/f0fff79f-e38e-4bb7-8fe2-7ffe92416d96)

After executing this statement, the expected result is consistent with MySQL;

set @@global.tidb_schema_cache_size=0

![Image](https://github.com/user-attachments/assets/04601759-dc09-40b4-98fe-f5739daf85e0)

question:
Doesn't TiDB cache metadata? When global.tidb_schema_cache_size is not 0, will the returned results meet expectations

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.