Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: mysql.stats_meta根据table_id,通过哪张表可以查到表名,和库名
I think the problem is that the tidb-server
process is not running. You can check if the process is running using the ps
command. If it is not running, you can start it using the systemctl start tidb
command.
Are you referring to this?
TIDB_TABLE_ID
: Identifies the internal ID of the table, which is unique within a TiDB cluster.
I want to find show stats_meta
, how can I write it using the select
syntax (or show stats_meta
can only display the columns I want)?
This might not be supported~ We’ll have to think of another way.
This can be achieved with the following query:
select * from mysql.stats_meta a, INFORMATION_SCHEMA.TABLES t where a.table_id = t.TIDB_TABLE_ID