mysql查看数据大小

查看mysql数据库大小的四种办法,分别有如下四种:

第一种:进去指定schema 数据库(存放了其余的数据库的信息)

use information_schemamysql


第二种:查询全部数据的大小

select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES(http://www.6ddd.com)sql

 

第三种:查看指定数据库的大小,好比说:数据库apoyl

select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES where table_schema='apoyl';数据库

 

第四种:查看指定数据库的表的大小,好比说:数据库apoyl 中apoyl_test表


select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES where table_schema='apoyl' and table_name='apoyl_test';spa

查看表的字符集orm

show table status from db_name like 'table_name%';get

相关文章
相关标签/搜索