12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
ADADADADAD
mysql数据库 时间:2024-12-25 09:58:38
作者:文/会员上传
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
查看数据库大小的方法:MariaDB [mysql]> show databases;MariaDB [mysql]> use information_schema;查询所有数据库大小:MariaDB [mysql]>select concat(round(sum(DATA_LENGT
以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。
查看数据库大小的方法:
MariaDB [mysql]> show databases;
MariaDB [mysql]> use information_schema;
查询所有数据库大小:
MariaDB [mysql]>select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES;
查询制定的数据库大小:
MariaDB [mysql]>select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES where table_schema='VIEWS';
可以看到,查询数据库大小只需要制定数据库的名称即可,如果需要查询数据库内制定表的大小,在最后添加条件即可:
MariaDB [mysql]> select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES where table_schema='VIEWS' and table_name='name';
11-20
11-19
11-20
11-20
11-20
11-19
11-20
11-20
11-19
11-20
11-19
11-19
11-19
11-19
11-19
11-19