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的时间).这些信息对我们进行库表维护很有 ...
随机推荐
- 解决mac eclipse 异常退出后无法打开处于loading状态
<workspace>\.metadata\.plugins\org.eclipse.core.resources目录,删除文件 .snap
- C++除法取整
使用floor函数.floor(x)返回的是小于或等于x的最大整数.如: floor(2.5) = 2 floor(-2.5) = -3 使用ceil函数.ceil(x)返回的是大于x的最小整 ...
- 在某个目录下的所有文件中查找包含某个字符串的Windows命令
findstr可以完成这个工作. 上面的命令表示,当前目录以及当前目录的所有子目录下的所有文件中查找"string"这个字符串. *.*表示所有类型的文件. /s 表示当前目录 ...
- JS 用window.open()函数,父级页面如何取到子级页面的返回值?
父窗口:<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> ...
- 头文件定义和ARM指令
2015.2.2星期一,阴天 内存管理:内存的分配和释放等静态和动态内存:主要是在释放方式上的区别 静态变量:编译时就已经确定,定义在函数外面自动变量:在程序运行时才能在栈中确定只读数据节:存放常量的 ...
- Objects and Data Structures
Date Abstraction Hiding implementation is not just a matter of putting a layer of fucntions between ...
- 最熟悉的陌生人:ListView 中的观察者模式
RecyclerView 得宠之前,ListView 可以说是我们用的最多的组件.之前一直没有好好看看它的源码,知其然不知其所以然. 今天我们来窥一窥 ListView 中的观察者模式. 不熟悉观察者 ...
- My97DatePicker日期控件用法
用法很简单,主要演示都在myDate.html <meta http-equiv="content-type" content="text/html; chars ...
- LeetCode Minimum Path Sum (简单DP)
题意: 给一个n*m的矩阵,每次可以往下或右走,经过的格子中的数字之和就是答案了,答案最小为多少? 思路: 比较水,只是各种空间利用率而已. 如果可以在原空间上作修改. class Solution ...
- 【题解】【区间】【二分查找】【Leetcode】Insert Interval & Merge Intervals
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessa ...