Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How do I query the footprint of the mysql table?

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report