RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
c语言怎么区分主函数,c语言主函数是什么

mysql怎么查看数据库中表的大小

1、查询整个mysql数据库,整个库的大小;单位转换为MB。

成都创新互联-专业网站定制、快速模板网站建设、高性价比罗平网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式罗平网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖罗平地区。费用合理售后完善,10余年实体公司更值得信赖。

select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data  from information_schema.TABLES

2、查询mysql数据库,某个库的大小;

select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data

from information_schema.TABLES

where table_schema = 'testdb'

3、查看库中某个表的大小;

select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data

from information_schema.TABLES

where table_schema = 'testdb'

and table_name = 'test_a';

4、查看mysql库中,test开头的表,所有存储大小;

select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data

from information_schema.TABLES

where table_schema = 'testdb'

and table_name like 'test%';

mysql怎么查看表占用空间大小?

1、进去指定schema 数据库(存放了其他的数据库的信息)\x0d\x0ause information_schema\x0d\x0a2、查询所有数据的大小\x0d\x0aselect concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES\x0d\x0a3、查看指定数据库的大小\x0d\x0a比如说 数据库apoyl\x0d\x0aselect concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES where table_schema='apoyl';\x0d\x0a4、查看指定数据库的表的大小\x0d\x0a比如说 数据库apoyl 中apoyl_test表\x0d\x0aselect concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES where table_schema='apoyl' and table_name='apoyl_test';\x0d\x0a整完了,有兴趣的可以试哈哦!挺使用哈\x0d\x0a网站找的,都是正解

mysql 一个大表的数据怎么查询

在mysql的information_schema下有存储数据库基本信息的数据字典表,可以通过查询tables表来获得所需要的表相关信息。


名称栏目:c语言怎么区分主函数,c语言主函数是什么
文章源于:http://sczitong.cn/article/dsgdied.html