//先进去MySQL自带管理库:information_schema
//自己的数据库:dbwww58com_kuchecarlib
//自己的表:t_carmodelparamvalue mysql> use information_schema;
Database changed
mysql> select data_length,index_length
-> from tables where
-> table_schema='dbwww58com_kuchecarlib'
-> and table_name = 't_carmodelparamvalue';
+-------------+--------------+
| data_length | index_length |
+-------------+--------------+
| 166379520 | 235782144 |
+-------------+--------------+
1 row in set (0.02 sec) mysql> select concat(round(sum(data_length/1024/1024),2),'MB') as data_length_MB,
-> concat(round(sum(index_length/1024/1024),2),'MB') as index_length_MB
-> from tables where
-> table_schema='dbwww58com_kuchecarlib'
-> and table_name = 't_carmodelparamvalue';
+----------------+-----------------+
| data_length_MB | index_length_MB |
+----------------+-----------------+
| 158.67MB | 224.86MB |
+----------------+-----------------+
1 row in set (0.03 sec)

转载:http://blog.csdn.net/partner4java/article/details/7579818

查看mysql表大小的更多相关文章

  1. mysql工具——使用mysqlshow查看mysql对象信息,查看mysql表大小

    关键词:查看表大小,mysqlshow mysqlshow --count -uroot -p test

  2. 查看mysql 表大小

    select round(sum(DATA_LENGTH / 1024 / 1024 ), 2) from `information_schema`.`tables` where table_sche ...

  3. SQL命令查看Mysql数据库大小

    SQL命令查看Mysql数据库大小的方法. 要想知道每个数据库的大小的话,步骤如下:1.进入information_schema 数据库(存放了其他的数据库的信息)use information_sc ...

  4. 查看MySQL数据库大小

    查看MySQL数据库大小 1.首先进入information_schema 数据库(存放了其他的数据库的信息) ? 1 2 mysql> use information_schema; Data ...

  5. 查看mysql表结构和表创建语句的方法(转)

    查看mysql表结构的方法有三种:1.desc tablename;例如:要查看jos_modules表结构的命令:desc jos_modules;查看结果:mysql> desc jos_m ...

  6. 【转】查看mysql表结构和表创建语句的方法

    转自:http://blog.csdn.net/business122/article/details/7531291 查看mysql表结构的方法有三种: 1.desc tablename; 例如: ...

  7. sql查看所有表大小的方法

    sql查看所有表大小的方法. 代码: declare @id int ) declare @pages int declare @dbname sysname ,) ,) ,) create tabl ...

  8. 查看mysql表和数据库的大小

    转自:http://xiaosu.blog.51cto.com/2914416/687835 1.查看数据库的大小 use 数据库名SELECT sum(DATA_LENGTH)+sum(INDEX_ ...

  9. 用SQL命令查看Mysql数据库大小

    要想知道每个数据库的大小的话,步骤如下: 1.进入information_schema 数据库(存放了其他的数据库的信息) use information_schema; 2.查询所有数据的大小: s ...

随机推荐

  1. 【Qt官方例程学习笔记】Application Example(构成界面/QAction/退出时询问保存/用户偏好载入和保存/文本文件的载入和保存/QCommandLineParser解析运行参数)

    The Application example shows how to implement a standard GUI application with menus, toolbars, and ...

  2. JDK1.8的安装与卸载

    Java的下载地址: https://www.java.com/zh_CN/download/ 下载完成后打开进入界面: 点击下一步, 上面也无需更改,也可自定义设置安装路径, 再次确认安装路径,点击 ...

  3. 【mybatis在控制台打印sql语句配置】

    导入jar包:http://pan.baidu.com/s/1sl8RU37 <strong>############################################### ...

  4. jexus处理静态文件(处理后缀)

    AspNet_Exts=txt就能把你指定的扩展名交给asp.net处理.同理,可以写很多个,AspNet_Exts=txt,htm,html

  5. Educational Codeforces Round 53C(二分,思维|构造)

    #include<bits/stdc++.h>using namespace std;const int N=1e6+6;int x[N],y[N];int sx,sy,n;char s[ ...

  6. Nacos深入浅出(九)

    然而Nacos的发布操作并不是上面我们想的那样通过代理去实现,通过下面的代码我们分析下: public class NacosConfigurationPropertiesBindingPostPro ...

  7. es6的箭头函数转换为普通函数,以及将await/async函数转为普通函数

    箭头函数转为普通函数: 1. 安装babel-preset-es2015  npm install babel-preset-es2015 --save-dev 2.在.babelrc文件夹中:  & ...

  8. Kubernetes基本概念之Name和NameSpace

    在Kubernetes中,所有对象都会被指定一个唯一的Name和UID. 用户还可以指定一些不要求唯一性的数据附加到对象上,例如Label和Annotation. 1. Name Name是创建一个K ...

  9. Chapter11

    package scala import scala.collection.mutable /** * Created by EX-CHENZECHAO001 on 2018-04-03. */cla ...

  10. 解决spark-shell输出日志信息过多

    import org.apache.log4j.Logger import org.apache.log4j.Level Logger.getLogger("org").setLe ...