Get the App
SLTechnology News&Howtos  ›  Servers  › 

How do I query the footprint of the mysql table?

Shulou Source: shulou.com Published: 2022-06-03 06:07:11 10月03日 Update

How do I query the footprint of the mysql table? I believe that many novice rookies have not yet learned this skill. Through the summary of this article, I hope you can learn to query the space occupied by mysql tables. The following information is about the syntax steps of the mysql query.

Select

Table_schema as' database'

Table_name as' table name'

Table_rows as' number of records'

Truncate (data_length/1024/1024, 2) as' data capacity (MB)'

Truncate (index_length/1024/1024, 2) as' Index capacity (MB)'

From information_schema.tables

Where table_schema='database'

Order by data_length desc, index_length desc

After reading the above, have you mastered the method of querying the occupied space of the mysql table? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: Query space content capacity skills data more size database novice method step article index industry grammar information information channel channel Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Shulou Information Microsoft Linux OPPO Reno