diff --git a/information-schema/information-schema-partitions.md b/information-schema/information-schema-partitions.md index 61510949922ab..bbb98ad0fe567 100644 --- a/information-schema/information-schema-partitions.md +++ b/information-schema/information-schema-partitions.md @@ -7,6 +7,10 @@ summary: Learn the `PARTITIONS` INFORMATION_SCHEMA table. The `PARTITIONS` table provides information about [partitioned tables](/partitioned-table.md). +> **Note:** +> +> Computing `AVG_ROW_LENGTH`, `DATA_LENGTH`, or `INDEX_LENGTH` requires TiDB to read per-column size statistics from the `mysql.stats_histograms` system table, which holds one row for each column of every table. On clusters with a large number of tables, selecting any of these columns can consume noticeably more time and resources than selecting only `TABLE_ROWS`, which reads only the smaller `mysql.stats_meta` system table. If you need only the estimated row count, select `TABLE_ROWS` without the size columns to avoid this overhead. + ```sql USE INFORMATION_SCHEMA; DESC partitions; diff --git a/information-schema/information-schema-tables.md b/information-schema/information-schema-tables.md index 77eb125c82bde..0bf33f43caf4f 100644 --- a/information-schema/information-schema-tables.md +++ b/information-schema/information-schema-tables.md @@ -123,6 +123,10 @@ The description of columns in the `TABLES` table is as follows: * `CREATE_OPTIONS`: Creates options. * `TABLE_COMMENT`: The comments and notes of the table. +> **Note:** +> +> Computing `AVG_ROW_LENGTH`, `DATA_LENGTH`, or `INDEX_LENGTH` requires TiDB to read per-column size statistics from the `mysql.stats_histograms` system table, which holds one row for each column of every table. On clusters with a large number of tables, selecting any of these columns can consume noticeably more time and resources than selecting only `TABLE_ROWS`, which reads only the smaller `mysql.stats_meta` system table. If you need only the estimated row count, select `TABLE_ROWS` without the size columns to avoid this overhead. + Most of the information in the table is the same as MySQL. The following columns are newly defined by TiDB: * `TIDB_TABLE_ID`: to indicate the internal ID of a table. This ID is unique in a TiDB cluster.