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的时间).这些信息对我们进行库表维护很有 ...
随机推荐
- hdoj-2019
#include "stdio.h"void sort(int number[],int n,int m);int main(){ int n,m,i,number[100]; s ...
- 一、XML语法
xml声明xml指令:<? ?>xml编码与乱码xml元素(标签)CDATA区空格与换行会被认为是标签的内容xml-stylesheet指令解析xml内容 <?xml version ...
- 使用iskindofclass来发现对象是否是某类或其子类的实例
发现对象是否是特定类或其子类的实例 要发现对象是否是某类或其子类的实例,请在对象上调用 isKindOfClass: 方法.当应用程序需要发现其响应的消息(实现的或继承的),它有时进行以上的检查. s ...
- iOS事件:触摸事件.运动事件.远程控制事件
iOS中,提供了事件处理:触摸事件,运动事件,远程控制事件.这很大得方便程序猿的工作. 这里先简单做个介绍: // // ViewController.m // demo // // Created ...
- C#使用指针表达式
如何:获取指针变量的值 使用指针间接运算符可获取位于指针所指向的位置的变量. 表达式采用下面的形式,其中, p 是指针类型: *p; 不能对除指针类型以外的任何类型的表达式使用一元间接寻址运算符. 此 ...
- Jquery 中toggle的用法举例
toggle用法是使得两个以上的方法交替出现. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ...
- magento currency magento头部增加币种切换选择
magento currency magento头部增加币种切换选择 默认magento 货币选择切换是显示在左边 有时候我们需要让其显示在头部 Step 1. Create a new file a ...
- 第三个Sprint完结工作 用场景来规划测试工作.
一.根据用户使用场景测试: 1.流程 典型群体 群体 张小明 年龄 7-12岁 职业 小学生 收入 压岁钱还有零花钱 能力 看一些简单的数,做一些相对简单的事 爱好 玩游戏 典型场景 张小明平时喜欢玩 ...
- SqlSever2005 一千万条以上记录分页数据库优化经验总结
http://www.cnblogs.com/jirigala/archive/2010/11/03/1868011.html 待测试???
- csdn第九名
编号:1025时间:2016年7月18日10:45:21功能:csdn第九名URL :http://blog.csdn.net/augusdi