In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The following mainly brings you how to view the mysql database and table occupancy space. I hope that how to view the mysql database and table footprint can bring you practical use, which is also the main purpose of my editing this article. All right, don't talk too much nonsense, let's just read the following.
1. The space occupied by the database
SELECT CONCAT (TRUNCATE (SUM (data_length) / 1024 SUM 1024), 'MB') AS data_size
CONCAT (TRUNCATE (SUM (max_data_length) / 1024 SUM 1024), 'MB') AS max_data_size
CONCAT (TRUNCATE (SUM (data_free) / 1024 SUM 1024), 'MB') AS data_free
CONCAT (TRUNCATE (SUM (index_length) / 1024 SUM 1024), 'MB') AS index_size
FROM information_schema.tables WHERE TABLE_SCHEMA = 'database name'
2. Space occupied by tables
SELECT CONCAT (TRUNCATE (SUM (data_length) / 1024 SUM 1024), 'MB') AS data_size
CONCAT (TRUNCATE (SUM (max_data_length) / 1024 SUM 1024), 'MB') AS max_data_size
CONCAT (TRUNCATE (SUM (data_free) / 1024 SUM 1024), 'MB') AS data_free
CONCAT (TRUNCATE (SUM (index_length) / 1024 SUM 1024), 'MB') AS index_size
FROM information_schema.tables WHERE TABLE_NAME = 'table name'
For the above about how the mysql database and table footprint should be viewed, you do not find it very helpful. If you need to know more, please continue to follow our industry information. I'm sure you'll like it.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.