show table status
SHOW TABLE STATUS works likes SHOW TABLES, but provides a lot of information about each non-TEMPORARYtable. 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:
NameThe name of the table.
EngineThe storage engine for the table. See Chapter 15, Alternative Storage Engines.
VersionThe version number of the table's
.frmfile.Row_formatThe row-storage format (
Fixed,Dynamic,Compressed,Redundant,Compact). ForMyISAMtables, (Dynamiccorresponds to what myisamchk -dvv reports asPacked. The format ofInnoDBtables is reported asRedundantorCompact. For theBarracudafile format of theInnoDB Plugin, the format may beCompressedorDynamic.RowsThe 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
Rowsvalue isNULLfor tables in theINFORMATION_SCHEMAdatabase.Avg_row_lengthThe average row length.
Data_lengthThe length of the data file.
Max_data_lengthThe 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_lengthThe length of the index file.
Data_freeThe number of allocated but unused bytes.
This information is also shown for
InnoDBtables (previously, it was in theCommentvalue).InnoDBtables 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.PARTITIONStable, 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_incrementThe next
AUTO_INCREMENTvalue.Create_timeWhen the table was created.
Update_timeWhen the data file was last updated. For some storage engines, this value is
NULL. For example,InnoDBstores multiple tables in its system tablespace and the data file timestamp does not apply. Even with file-per-table mode with eachInnoDBtable in a separate.ibdfile, 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_timeWhen the table was last checked. Not all storage engines update this time, in which case the value is always
NULL.CollationThe table's character set and collation.
ChecksumThe live checksum value (if any).
Create_optionsExtra options used with
CREATE TABLE. The original options supplied whenCREATE TABLEis called are retained and the options reported here may differ from the active table settings and options.CommentThe 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的时间).这些信息对我们进行库表维护很有 ...
随机推荐
- hdu 2076
ps:WA了三次...第一次头脑有点乱,很麻烦的分几种情况讨论,第二次发现,只要分别算出时针和分针的角度,然后一减就行,却忽略了哪个大的问题,第三次加上了绝对值,就好了..就是以后double型比较最 ...
- Spring中@Resource、@controller注解的含义
@Resource 注解被用来激活一个命名资源(named resource)的依赖注入,在JavaEE应用程序中,该注解被典型地转换为绑定于JNDI context中的一个对象. Spring确实支 ...
- (spring-第7回【IoC基础篇】)BeanDefinition的载入与解析&&spring.schemas、spring.handlers的使用
报错信息:Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http: ...
- iOS之《 Human Interface Guidelines:from Concept to Product 》<界面设计指南 二>:从概念到产品的实现
开发之前需要想到的: 1.列出所有用户可能喜欢的功能. 例子:食谱 (1)创建一个总的食谱菜单 (2)食谱的获取方法 (3)比较价格 (4)当地的食材店 (5)食谱每道菜的注释 (6)能够获取和使用 ...
- Detail in Response.redirect and Server.transfer in ASP.NET
http://www.developerfusion.com/article/4643/implementing-http-handlers-in-aspnet/4/
- linux命令:mkdir
1.介绍: mkdir用来创建目录,要求创建目录的用户在当前目录具有写的权限. 2.命令格式: mkdir [选项] 目录 3.命令参数 -m, --mode=模式,设定权限<模式> (类 ...
- JQuery源码分析(六)
方法链式调用的实现 写的更少,做的更多.是JQuery的核心理念. 那么链式方法的设计与这个核心理念不谋而合.那么从深层次考虑这种设计其实就是一种Internal DSL. DSL是指Domain S ...
- PHP date和time
一.time()函数 time():得到一个数字,这个数字表示从1970-01-01到现在共走了多少秒. 前一天的时间就是 time()-60*60*24. 前一年的时间就是 time()-60*60 ...
- HDU 4407
http://acm.hdu.edu.cn/showproblem.php?pid=4407 把修改和询问分成两部分解决 询问求区间内与p不互素的和,和求个数一样,用容斥原理解决,只不过做容斥的时候把 ...
- invoke Javascript from C# code
http://justyouraveragegeek.com/blog/index.php/2010/03/winforms-with-a-webbrowsercontrol-fun-with-obj ...