In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the method of querying database size by mysql, which has certain reference value and can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.
Mysql query the size of the database: 1, query the size of the entire library, the code is [select concat (round (sum (DATA_LENGTH/1024/1024), 2), 'MB')]; 2, query the size of a database, the code is [from informati].
Mysql query the size of the database:
1, query the entire mysql database, the size of the entire database; units are converted to MB.
Select concat (round (sum (DATA_LENGTH/1024/1024), 2), 'MB') as data from information_schema.TABLES
2. Query the mysql database, the size of a certain database
Select concat (round (sum (DATA_LENGTH/1024/1024), 2), 'MB') as data from information_schema.TABLES where table_schema =' testdb'
3. View the size of a table in the library
Select concat (round (sum (DATA_LENGTH/1024/1024), 2), 'MB') as data from information_schema.TABLES where table_schema =' testdb' and table_name = 'test_a'
4. View the table at the beginning of test in the mysql library, and all the storage sizes
Select concat (round (sum (DATA_LENGTH/1024/1024), 2), 'MB') as data from information_schema.TABLES where table_schema =' testdb' and table_name like 'test%'
Thank you for reading this article carefully. I hope it is helpful for everyone to share the method of querying the size of the database by mysql. At the same time, I also hope that you can support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!
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.