show table status
SHOW TABLE STATUS
works likes SHOW TABLES
, but provides a lot of information about each non-TEMPORARY
table. You can also get this list using the mysqlshow --status db_name
command. The LIKE
clause, if present, indicates which table names to match. The WHERE
clause can be given to select rows using more general conditions, as discussed in Section 21.31, “Extensions to SHOW Statements”.
This statement also displays information about views.
SHOW TABLE STATUS
output has the following columns:
Name
The name of the table.
Engine
The storage engine for the table. See Chapter 15, Alternative Storage Engines.
Version
The version number of the table's
.frm
file.Row_format
The row-storage format (
Fixed
,Dynamic
,Compressed
,Redundant
,Compact
). ForMyISAM
tables, (Dynamic
corresponds to what myisamchk -dvv reports asPacked
. The format ofInnoDB
tables is reported asRedundant
orCompact
. For theBarracuda
file format of theInnoDB Plugin
, the format may beCompressed
orDynamic
.Rows
The number of rows. Some storage engines, such as
MyISAM
, store the exact count. For other storage engines, such asInnoDB
, this value is an approximation, and may vary from the actual value by as much as 40 to 50%. In such cases, useSELECT COUNT(*)
to obtain an accurate count.The
Rows
value isNULL
for tables in theINFORMATION_SCHEMA
database.Avg_row_length
The average row length.
Data_length
The length of the data file.
Max_data_length
The maximum length of the data file. This is the total number of bytes of data that can be stored in the table, given the data pointer size used.
Index_length
The length of the index file.
Data_free
The number of allocated but unused bytes.
This information is also shown for
InnoDB
tables (previously, it was in theComment
value).InnoDB
tables report the free space of the tablespace to which the table belongs. For a table located in the shared tablespace, this is the free space of the shared tablespace. If you are using multiple tablespaces and the table has its own tablespace, the free space is for only that table. Free space means the number of completely free 1MB extents minus a safety margin. Even if free space displays as 0, it may be possible to insert rows as long as new extents need not be allocated.For partitioned tables, this value is only an estimate and may not be absolutely correct. A more accurate method of obtaining this information in such cases is to query the
INFORMATION_SCHEMA.PARTITIONS
table, as shown in this example:SELECT SUM(DATA_FREE)
FROM INFORMATION_SCHEMA.PARTITIONS
WHERE TABLE_SCHEMA = 'mydb'
AND TABLE_NAME = 'mytable';For more information, see Section 21.12, “The INFORMATION_SCHEMA PARTITIONS Table”.
Auto_increment
The next
AUTO_INCREMENT
value.Create_time
When the table was created.
Update_time
When the data file was last updated. For some storage engines, this value is
NULL
. For example,InnoDB
stores multiple tables in its system tablespace and the data file timestamp does not apply. Even with file-per-table mode with eachInnoDB
table in a separate.ibd
file, change buffering can delay the write to the data file, so the file modification time is different from the time of the last insert, update, or delete. ForMyISAM
, the data file timestamp is used; however, on Windows the timestamp is not updated by updates so the value is inaccurate.Check_time
When the table was last checked. Not all storage engines update this time, in which case the value is always
NULL
.Collation
The table's character set and collation.
Checksum
The live checksum value (if any).
Create_options
Extra options used with
CREATE TABLE
. The original options supplied whenCREATE TABLE
is called are retained and the options reported here may differ from the active table settings and options.Comment
The comment used when creating the table (or information as to why MySQL could not access the table information).
For MEMORY
tables, the Data_length
, Max_data_length
, and Index_length
values approximate the actual amount of allocated memory. The allocation algorithm reserves memory in large amounts to reduce the number of allocation operations.
For NDBCLUSTER
tables, the output of this statement shows appropriate values for the Avg_row_length
andData_length
columns, with the exception that BLOB
columns are not taken into account
For views, all the fields displayed by SHOW TABLE STATUS
are NULL
except that Name
indicates the view name andComment
says view
.
show table status的更多相关文章
- mysqldump: Couldn't execute 'show table status '解决方法
执行:[root@host2 lamp]# mysqldump -F -R -E --master-data=2 -p -A --single-transaction 在控制台端出现 mysqld ...
- mysql学习之-show table status(获取表的信息)参数说明
--获取表的信息mysql> show table status like 'columns_priv'\G;*************************** 1. row ******* ...
- A better SHOW TABLE STATUS
From command line we have the entire MySQL server on hands (if we have privileges too of course) but ...
- mysql命令学习笔记(1):show table status like 'user';显示表的相关信息
show table status like 'user';显示表的相关信息 +------------+--------+---------+------------+------+-------- ...
- mysql中使用show table status 查看表信息
本文导读:在使用mysql数据库时,经常需要对mysql进行维护,查询每个库.每个表的具体使用情况,Mysql数据库可以通过执行SHOW TABLE STATUS命令来获取每个数据表的信息. 一.使用 ...
- mysql中使用show table status 查看表信息
学习标签: mysql 本文导读:在使用mysql数据库时,经常需要对mysql进行维护,查询每个库.每个表的具体使用情况,Mysql数据库可以通过执行SHOW TABLE STATUS命令来获取每个 ...
- mysql table status
SHOW TABLE STATUS 能获得表的信息 可以SHOW TABLE STATUS where name='表名'
- mysql中 show table status 获取表信息
用法 mysql>show table status; mysql>show table status like 'esf_seller_history'\G; mysql>show ...
- MySQL通过SHOW TABLE STATUS查看库中所有表的具体信息
有时候我们想看下指定库下所有表的使用情况,比如,查询表的Table大小,什么时候创建的,数据最近被更新的时间(即最近一笔insert/update/delete的时间).这些信息对我们进行库表维护很有 ...
随机推荐
- Yii数据库操作增删改查-[增加\查询\更新\删除 AR模式]
在Yii的开发中常常需要去使用Yii的增删改查方法,这些方法又可以多次变化和组合,带来全方位的实现对数据库的处理,下面对这些方法做一些简单的整理和梳理,有遗漏或是BUG,敬请指出.灰常感谢!!! 一. ...
- coreData旧版本增加字段,新版本是否可以继续使用旧版本内容的测试(MagicalRecord的使用)
coreData使用第三方库MagicalRecord, 参考文章:http://blog.csdn.net/kuizhang1/article/details/21200367 coreData数据 ...
- IPhone手机自动添加到itunes设置
一,项目设置 如图:点击项目--info 在key下面条目上右键点击,选择添加Application supports iTunes file sharing value设置为yes
- Brute-force Algorithm_矩阵快速幂&&欧拉公式*****
Problem Description Professor Brute is not good at algorithm design. Once he was asked to solve a pa ...
- Best Cow Fences_二分&&DP
Description Farmer John's farm consists of a long row of N (1 <= N <= 100,000)fields. Each fie ...
- 查单神器v1.0 升级 →B站看鬼畜神器v1.0
去年学校实习,我去了一家快递输单公司工作.工作任务就是把运单图片上的内容(寄件人,地址之类)输入到公司的数据库里.每天输单结束后,还要对一些容易错的运单进行排查.单量多的时候一天甚至要查千张以上的运单 ...
- ehcache memcache redis -- java中的三大缓存
三个缓存在java代码中用的是较多的,但是它们都有自己的应用场合,和优缺点. Ehcache 1.初衷:减少数据库操作的高延时而设计.(缓存的目的,好像都是这个吧) 2.Apache Licen ...
- ANTLR3完全参考指南读书笔记[08]
前言 不要让用户被那些“专业术语”吓住! 用心设计的提示和反馈信息是软件设计者的“职业良心”. 内容 1 存在哪些错误? 2 美化错误提示 3 错误恢复策略 1 存在哪些错误? 在DSL语言开 ...
- Apache Flex + Adobe Flash Builder环境配置
在开始学习Flex之前,需要配置开发环境.Apache Flex SDK包含了你开发所需要的东西,当然除了集成开发环境(Integrated Development Environment,IDE). ...
- SAP 增强说明
转自http://blog.csdn.net/lyb_yt/article/details/8177974 (一)什么是增强(Enhancement)? 简单地说,增强就是ERP系统中标准程序的出口, ...