テーブルステータスを表示

このステートメントは、TiDB 内のテーブルに関するさまざまな統計を示します。統計が古いと思われる場合は、 ANALYZE TABLEを実行することをお勧めします。

あらすじ

ShowTableStatusStmt:

ShowTableStatusStmt

送信者または受信者:

FromOrIn

ステータステーブル名:

StatusTableName

mysql> CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, c1 INT NOT NULL); Query OK, 0 rows affected (0.11 sec) mysql> INSERT INTO t1 (c1) VALUES (1),(2),(3),(4),(5); Query OK, 5 rows affected (0.02 sec) Records: 5 Duplicates: 0 Warnings: 0 mysql> SHOW TABLE STATUS LIKE 't1'\G *************************** 1. row *************************** Name: t1 Engine: InnoDB Version: 10 Row_format: Compact Rows: 0 Avg_row_length: 0 Data_length: 0 Max_data_length: 0 Index_length: 0 Data_free: 0 Auto_increment: 30001 Create_time: 2019-04-19 08:32:06 Update_time: NULL Check_time: NULL Collation: utf8mb4_bin Checksum: Create_options: Comment: 1 row in set (0.00 sec) mysql> analyze table t1; Query OK, 0 rows affected (0.12 sec) mysql> SHOW TABLE STATUS LIKE 't1'\G *************************** 1. row *************************** Name: t1 Engine: InnoDB Version: 10 Row_format: Compact Rows: 5 Avg_row_length: 16 Data_length: 80 Max_data_length: 0 Index_length: 0 Data_free: 0 Auto_increment: 30001 Create_time: 2019-04-19 08:32:06 Update_time: NULL Check_time: NULL Collation: utf8mb4_bin Checksum: Create_options: Comment: 1 row in set (0.00 sec)

MySQLの互換性

TiDB のSHOW TABLE STATUSステートメントは MySQL と完全な互換性があります。互換性の違いが見つかった場合は、 バグを報告 .

こちらも参照

このページは役に立ちましたか?

Playground
新規
登録なしで TiDB の機能をワンストップでインタラクティブに体験できます。
製品
TiDB Cloud
TiDB
価格
PoC お問い合わせ
エコシステム
TiKV
TiFlash
OSS Insight
© 2024 PingCAP. All Rights Reserved.
Privacy Policy.