mysql.table_stats Table

The mysql.table_stats table is one of three tables storing data used for Engine-independent table statistics added in MariaDB 10.0.1. The others are mysql.column_stats and mysql.index_stats.

MariaDB starting with 10.4

In MariaDB 10.4 and later, this table uses the Aria storage engine.

MariaDB until 10.3

In MariaDB 10.3 and before, this table uses the MyISAM storage engine.

The mysql.table_stats table contains the following fields:

Field Type Null Key Default Description
db_name varchar(64) NO PRI NULL Database the table is in .
table_name varchar(64) NO PRI NULL Table name.
cardinality bigint(21) unsigned YES NULL Number of records in the table.

It is possible to manually update the table. See Manual updates to statistics tables for details.

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.

© 2021 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/mysqltable_stats-table/