然后百度
查询数据库剩余容量
SELECT TABLE_SCHEMA, concat( TRUNCATE ( sum( data_length )/ 1024 / 1024, 2 ), 'MB' ) AS data_size, concat( TRUNCATE ( sum( index_length )/ 1024 / 1024, 2 ), 'MB' ) AS index_size FROM information_schema.TABLES GROUP BY TABLE_SCHEMA ORDER BY sum( data_length ) DESC;
字段解释
注释:
table_schema:数据库名
table_name:表名
table_rows:记录数
data_length:数据大小
index_length:数据库剩余容量
engine:所使用的存储引擎
查询系统文件
SELECT file_name,CONCAT(TOTAL_EXTENTS,'MB') AS 'FileSize' FROM INFORMATION_SCHEMA.FILES ORDER BY TOTAL_EXTENTS DESC LIMIT 20
- LOCK_WRITE_GROWTH statement execute running GROWTHlock_write_growth statement execute running skip-grant-tables statement execute running lock_write_growth statement executing password before execution interrupted statement exceeded declaration executable statement appear skip-grant-tables密码execute running growth fp-growth database oracle script growth