查看表信息:
mysql> show table status like 'tb_user' \G
*************************** 1. row ***************************
Name: tb_user
Engine: InnoDB
Version: 10
Row_format: Dynamic
Rows: 8
Avg_row_length: 2048
Data_length: 16384
Max_data_length: 0
Index_length: 16384
Data_free: 0
Auto_increment: 8
Create_time: 2018-09-03 19:46:04
Update_time: NULL
Check_time: NULL
Collation: utf8_general_ci
Checksum: NULL
Create_options:
Comment: 用户表
1 row in set (0.01 sec)
mysql> show table status like 'tb_address' \G;
*************************** 1. row ***************************
Name: tb_address
Engine: MyISAM
Version: 10
Row_format: Dynamic
Rows: 6
Avg_row_length: 72
Data_length: 432
Max_data_length: 281474976710655
Index_length: 2048
Data_free: 0
Auto_increment: 65
Create_time: 2018-09-03 19:46:04
Update_time: 2018-09-03 19:46:04
Check_time: NULL
Collation: utf8_general_ci
Checksum: NULL
Create_options:
Comment:
1 row in set (0.00 sec)
Rows
The number of rows in the table. For MyISAM and most other engines, this number is always accurate. For InnoDB, it is an estimate.
Avg_row_length
How many bytes the average row contains.
Data_length
How much data (in bytes) the entire table contains.
Max_data_length
The maximum amount of data this table can hold. This is engine-specific.
Index_length
How much disk space the index data consumes.
Data_free
For a MyISAM table, the amount of space that is allocated but currently unused. This space holds previously deleted rows and can be reclaimed by future INSERT statements.
Auto_increment
The next AUTO_INCREMENT value.
Create_time
When the table was first created.
Update_time
When data in the table last changed.
Check_time
When the table was last checked using CHECK TABLE or myisamchk.
Collation
The default character set and collation for character columns in this table.
Checksum
A live checksum of the entire table’s contents, if enabled.
Create_options
Any other options that were specified when the table was created.
Comment
This field contains a variety of extra information. For a MyISAM table, it contains the comments, if any, that were set when the table was created. If the table uses the InnoDB storage engine, the amount of free space in the InnoDB tablespace appears here. If the table is a view, the comment contains the text “VIEW.”
MyISAM
1.不支持事务和行级锁
MyISAM doesn’t support transactions or row-level locks.