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

View database tablespace .md

2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

View the size of data footprint:

SELECT CONCAT (ROUND (SUM (data_length) / (1024 / 1024 / 1024), 6), 'GB') AS' Total Data Size' FROM information_schema.TABLES WHERE table_schema LIKE 'quizzes'

View the space under the specified database schema:

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 = 'quizzes' SELECT CONCAT (table_schema,'.',table_name) AS 'Table Name', table_rows AS' Number of Rows', CONCAT (ROUND (data_length/ (1024) 1024), 6),'G') AS 'Data Size', CONCAT (ROUND (index_length/ (1024) 1024), 6),' G') AS 'Index Size', CONCAT (ROUND ((data_length+index_length) / (1024) 1024 1024), 6) 'G') AS'Total' FROM information_schema.TABLES WHERE table_schema LIKE' aries_account' order by Total

View the space of all schema under this instance:

Select table_schema, sum (data_length+index_length) / 1024 index_length 1024 as total_mb, sum (data_length) / 1024 as data_mb, sum (index_length) / 1024 as index_mb, count (*) as tables, curdate () as today from information_schema.tables group by table_schema order by 2 desc Select concat (truncate (sum (data_length) / 1024Accord1024L2), 'MB') as data_size, concat (truncate (sum (max_data_length) / 1024Lex1024L2),' MB') as max_data_size, concat (truncate (sum (data_free) / 1024comp1024L2), 'MB') as data_free, concat (truncate (sum (index_length) / 1024comp1024Ma2),' MB') as index_size from information_schema.tables

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

Database

Wechat

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

12
Report