Slow Query on System Tables

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 系统表查询很慢

| username: mono

[TiDB Usage Environment] Production Environment
[TiDB Version] 5.4.2
Querying system tables in the performance_schema database is quite slow.

mysql> select * from tidb_profile_cpu limit 2;
±--------------------±------------±------------±-----------±------±------------------------------------------+
| FUNCTION | PERCENT_ABS | PERCENT_REL | ROOT_CHILD | DEPTH | FILE |
±--------------------±------------±------------±-----------±------±------------------------------------------+
| root | 100% | 100% | 0 | 0 | root |
| ├─runtime.mcall | 30.43% | 30.43% | 1 | 1 | /usr/local/go/src/runtime/asm_amd64.s:327 |
±--------------------±------------±------------±-----------±------±------------------------------------------+
2 rows in set (30.00 sec)

| username: 友利奈绪 | Original post link

You can’t tell anything just by looking at the sentence.

| username: mono | Original post link

Well, then don’t look at it. It’s a waste of effort!

| username: WalterWj | Original post link

This looks like it’s for viewing the TiDB flame graph. It’s normal to capture for 30 seconds to analyze. :thinking:

| username: mono | Original post link

There isn’t one. You can provide feedback in the documentation area or submit an issue to the docs.

| username: redsong | Original post link

Can’t understand.

| username: xiaoqiao | Original post link

Is there any volume?

| username: mono | Original post link

The expert above has already replied. Please do not continue the thread.

| username: wangkk2024 | Original post link

Top :top::top::top::top: