如何檢查特定 MySQL 資料庫中表的表狀態?


藉助 show table status 語句,我們可以檢查資料庫中的表狀態。例如,在名為 tutorial 的資料庫中,透過執行此語句,我們可以獲取表的以下狀態 -

mysql> show table status \G
*************************** 1. row ***************************
           Name: student
         Engine: InnoDB
        Version: 10
     Row_format: Compact
           Rows: 0
 Avg_row_length: 0
    Data_length: 16384
Max_data_length: 0
   Index_length: 0
      Data_free: 7340032
 Auto_increment: NULL
    Create_time: 2017-10-24 09:34:29
    Update_time: NULL
     Check_time: NULL
      Collation: latin1_swedish_ci
       Checksum: NULL
 Create_options:
        Comment:
1 row in set (0.00 sec)

此資料庫只含一張名為“student”的表。

更新於:2020 年 6 月 22 日

336 次瀏覽

開啟你的 職業生涯

完成課程即可獲得認證

立即開始
廣告
© . All rights reserved.