In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
It is believed that many inexperienced people have no idea about how to query the relevant data when collating the mysql database. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
The first SQL statement to query the disk space occupied by all databases is as follows: select TABLE_SCHEMA, concat (truncate (sum (data_length) / 1024 data_length 2), 'MB') as data_size, concat (truncate (sum (index_length) / 1024 index_length),' MB') as index_size from information_schema.tables group by TABLE_SCHEMA order by data_length desc Then query the disk space occupied by each table in a single database, including the size of its index. The SQL statement is as follows: select TABLE_NAME, concat (truncate (data_length/1024/1024,2), 'MB') as data_size, concat (truncate (index_length/1024/1024,2),' MB') as index_size from information_schema.tables where TABLE_SCHEMA = `dbname` group by TABLE_NAME order by data_length desc;mysql to view the number of records of all tables in the database use information_schema Select table_name,table_rows from tables where TABLE_SCHEMA = 'dbname' order by table_rows desc; exports the database file and ignores a table / usr/bin/mysqldump-- set-gtid-purged=OFF-h227.0.0.1-uroot-p123456 dbname-- ignore-table=dbname.tb1--ignore-table=dbname.tb2 >. / db_files/dsp.sql after reading the above, do you know how to query the relevant data when sorting out the mysql database? 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.
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.