mysql查看表大小
mysql查看表大小
一:命令 show table status like 'table_name'\G;
mysql> show table status like 'x'\G;
*************************** 1. row ***************************
Name: x
Engine: InnoDB
Version: 10
Row_format: Compact
Rows: 97909
Avg_row_length: 37
Data_length: 3686400
Max_data_length: 0
Index_length: 0
Data_free: 4194304
Auto_increment: NULL
Create_time: 2015-05-16 10:41:50
Update_time: NULL
Check_time: NULL
Collation: latin1_swedish_ci
Checksum: NULL
Create_options:
Comment:
其中的data_length 为数据大小;
二:命令:1> use information_schema; 2>select data_length,index_length from tables where table_schema='xxxx' and table_name = 'xxx';
mysql> use information_schema;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A Database changed
mysql> select data_length,index_length from tables where table_schema ='test' \
-> and table_name = 'x'\G;
*************************** 1. row ***************************
data_length: 3686400
index_length: 0
1 row in set (0.00 sec)
MB显示:
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 = 'test' and table_name ='x'\G;
*************************** 1. row ***************************
data_length_MB: 3.52MB
index_length_MB: 0.00MB
1 row in set (0.04 sec)
TABLE_SCHEMA : 数据库名
TABLE_NAME:表名
ENGINE:所使用的存储引擎
TABLES_ROWS:记录数
DATA_LENGTH:数据大小
INDEX_LENGTH:索引大小
mysql查看表大小的更多相关文章
- MySQL 查看表大小
当遇到数据库占用空间很大的情况下,可以用以下语句查找大数据量的表 SELECT TABLE_NAME ,),) 'DATA_SIZE(M)' ,),) 'INDEX_SIZE(M)' ,AVG_ROW ...
- MySQL查看表占用空间大小(转)
MySQL查看表占用空间大小(转) //先进去MySQL自带管理库:information_schema //自己的数据库:dbwww58com_kuchecarlib //自己的表:t_carmod ...
- mysql单表大小的限制
mysql单表大小的限制一.MySQL数据库的MyISAM存储 引擎单表大小限制已经不是有MySQL数据库本身来决定(限制扩大到64pb),而是由所在主机的OS上面的文件系统来决定了.在mysql5. ...
- MySQL 查看表结构
mysql查看表结构命令,如下: desc 表名; show columns from 表名; describe 表名; show create table 表名; use information_s ...
- mysql查看表结构命令
mysql查看表结构命令 mysql查看表结构命令,如下: desc 表名;show columns from 表名;describe 表名;show create table 表名; use inf ...
- mysql查看表结构,字段等命令
mysql查看表结构命令,如下: desc 表名; show columns from 表名; describe 表名; show create table 表名;
- MySQL查看数据库大小、表大小和最后修改时间
查看数据库表基本信息. select * from information_schema.TABLES where information_schema.TABLES.TABLE_SCHEMA = ' ...
- 查看mysql数据库表大小和最后修改时间
查看mysql数据库表相关信息如表大小.修改更新等信息,可以通过以下方式: 一 show table status like ’table_name‘ ; 二 在infortmation_sche ...
- MySQL查看表占用空间大小
需求:我们在选购服务器硬盘时,通常需要先估算一下数据量.比如我们现在做的项目,百万级用户,然后在现有的数据结构中插入一万条数据,然后根据相应的需求去计算出实际生产中的数据量. 前言:在mysql中有一 ...
随机推荐
- HTML学习 表格和表单
<table></table> 表格标签 width 宽度 border 边框 cellpadding 内容和单元格之间的 ...
- TurnipBit之DIY无线遥控智能小车
一.准备工作 TurnipBit 开发板 2块 TurnipBit 扩展板 1块 数据线 1条 智能小车器件 1套 电机驱动模块(L298N) 1个 在线可视化编程 点击进入 二.思路设计 2 ...
- MySQL5.7新特性:lossless replication 无损复制
MySQL的三种复制方式 asynchronous 异步复制 fully synchronous 全同步复制 Semisynchronous 半同步复制 asynchronous replicatio ...
- 希尔排序(Go语言)
func ShellSort(num []int) { //increment相隔数量 ;increment> ;increment/= { //i序号较大的数组下标,i ,j进行比较 for ...
- 【转载】从头编写 asp.net core 2.0 web api 基础框架 (3)
Github源码地址:https://github.com/solenovex/Building-asp.net-core-2-web-api-starter-template-from-scratc ...
- 原来你是这样的JAVA[03]-继承、多态、抽象类
一.继承 Java中的继承使用关键字extends ,跟C#的语法略有差别. 1.子类构造器 java会自动在子类的构造器中插入对父类构造器的调用,也就是说在子类可以访问父类之前已经完成了父类的初始化 ...
- 14、ABPZero系列教程之拼多多卖家工具 新建微信公众号模块
说是模块,其实在MVC中就是区域,新建一个区域专门管理整个微信功能. Web项目新建区域 在Web项目Areas目录下新建一个区域,名称为“Weixin",如下图: 接着打开web.conf ...
- 学习web前端技术的笔记,仅供自己查阅备忘,图片上传预览
<!DOCTYPE html><html><head lang="en"> <meta charset="UTF-8" ...
- 【Java学习笔记之六】java三种循环(for,while,do......while)的使用方法及区别
第一种:for循环 循环结构for语句的格式: for(初始化表达式;条件表达式;循环后的操作表达式) { 循环体; } eg: class Dome_For2{ public st ...
- C/C++中inline用法详解
(一)inline函数(摘自C++ Primer的第三版) 在函数声明或定义中函数返回类型前加上关键字inline即把min()指定为内联. inline int min(int first, int ...