Chinaunix首页 | 论坛 | 博客
  • 博客访问: 348792
  • 博文数量: 85
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 657
  • 用 户 组: 普通用户
  • 注册时间: 2013-07-17 20:48
个人简介

行到水穷处,坐看云起时

文章分类

全部博文(85)

文章存档

2019年(2)

2018年(1)

2016年(1)

2015年(66)

2014年(15)

我的朋友

分类: Mysql/postgreSQL

2014-11-29 17:32:44

/* 数据库总存储空间 */
select sum(data_length+index_length) size from information_schema.tables;


/* 不同数据库的存储空间 */
select table_schema,sum(data_length+index_length) size from information_schema.tables group by table_schema order by size desc;


/* 指定库下不同表的存储空间 */
select table_name,sum(data_length+index_length) size from information_schema.tables where table_schema='test' group by table_name order by size desc;
阅读(1247) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~