索引的

mysql> show indexes from recordsInRangeTest;
+--------------------+------------+--------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+--------------------+------------+--------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| recordsInRangeTest | | PRIMARY | | id | A | | NULL | NULL | | BTREE | | |
| recordsInRangeTest | | idx_name | | name | A | | NULL | NULL | YES | BTREE | | |
| recordsInRangeTest | | idx_age | | age | A | | NULL | NULL | YES | BTREE | | |
| recordsInRangeTest | | idx_age_name | | name | A | | NULL | NULL | YES | BTREE | | |
| recordsInRangeTest | | idx_age_name | | age | A | | NULL | NULL | YES | BTREE | | |
+--------------------+------------+--------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
rows in set (0.00 sec)

select * from innodb_index_stats where table_name='recordsInRangeTest';

+---------------+--------------------+--------------+---------------------+--------------+------------+-------------+-----------------------------------+
| database_name | table_name | index_name | last_update | stat_name | stat_value | sample_size | stat_description |
+---------------+--------------------+--------------+---------------------+--------------+------------+-------------+-----------------------------------+
| test | recordsInRangeTest | PRIMARY | 2018-07-17 05:02:50 | n_diff_pfx01 | 24290 | 20 | id |
| test | recordsInRangeTest | PRIMARY | 2018-07-17 05:02:50 | n_leaf_pages | 55 | NULL | Number of leaf pages in the index |
| test | recordsInRangeTest | PRIMARY | 2018-07-17 05:02:50 | size | 97 | NULL | Number of pages in the index |
| test | recordsInRangeTest | idx_age | 2018-07-17 05:02:50 | n_diff_pfx01 | 6 | 29 | age |
| test | recordsInRangeTest | idx_age | 2018-07-17 05:02:50 | n_diff_pfx02 | 24576 | 29 | age,id |
| test | recordsInRangeTest | idx_age | 2018-07-17 05:02:50 | n_leaf_pages | 29 | NULL | Number of leaf pages in the index |
| test | recordsInRangeTest | idx_age | 2018-07-17 05:02:50 | size | 30 | NULL | Number of pages in the index |
| test | recordsInRangeTest | idx_age_name | 2018-07-17 05:02:50 | n_diff_pfx01 | 6 | 29 | name |
| test | recordsInRangeTest | idx_age_name | 2018-07-17 05:02:50 | n_diff_pfx02 | 11 | 29 | name,age |
| test | recordsInRangeTest | idx_age_name | 2018-07-17 05:02:50 | n_diff_pfx03 | 24576 | 29 | name,age,id |
| test | recordsInRangeTest | idx_age_name | 2018-07-17 05:02:50 | n_leaf_pages | 29 | NULL | Number of leaf pages in the index |
| test | recordsInRangeTest | idx_age_name | 2018-07-17 05:02:50 | size | 30 | NULL | Number of pages in the index |
| test | recordsInRangeTest | idx_name | 2018-07-17 05:02:50 | n_diff_pfx01 | 6 | 24 | name |
| test | recordsInRangeTest | idx_name | 2018-07-17 05:02:50 | n_diff_pfx02 | 24576 | 24 | name,id |
| test | recordsInRangeTest | idx_name | 2018-07-17 05:02:50 | n_leaf_pages | 24 | NULL | Number of leaf pages in the index |
| test | recordsInRangeTest | idx_name | 2018-07-17 05:02:50 | size | 25 | NULL | Number of pages in the index |
+---------------+--------------------+--------------+---------------------+--------------+------------+-------------+-----------------------------------+

表本身的

+--------------------+--------+---------+------------+-------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+---------+
| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment |
+--------------------+--------+---------+------------+-------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+---------+
| recordsInRangeTest | InnoDB | | Compact | | | | | | | | -- :: | NULL | NULL | latin1_swedish_ci | NULL | | |
+--------------------+--------+---------+------------+-------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+---------+

mysql表的核心元数据的更多相关文章

  1. mysql:表注释和字段注释

    mysql:表注释和字段注释 1 创建表的时候写注释 create table test1 ( field_name int comment '字段的注释' )comment='表的注释'; 2 修改 ...

  2. [转载]github在线更改mysql表结构工具gh-ost

    GitHub正式宣布以开源的方式发布gh-ost:GitHub的MySQL无触发器在线更改表定义工具! gh-ost是GitHub最近几个月开发出来的,目的是解决一个经常碰到的问题:不断变化的产品需求 ...

  3. 利用Flume将MySQL表数据准实时抽取到HDFS

    转自:http://blog.csdn.net/wzy0623/article/details/73650053 一.为什么要用到Flume 在以前搭建HAWQ数据仓库实验环境时,我使用Sqoop抽取 ...

  4. python 多线程删除MySQL表

    一.需求分析 在<python 统计MySQL表信息>这篇博客中,链接如下: https://www.cnblogs.com/xiao987334176/p/9901692.html 已经 ...

  5. MySQL表的碎片整理和空间回收小结

    MySQL表碎片化(Table Fragmentation)的原因 关于MySQL中表碎片化(Table Fragmentation)产生的原因,简单总结一下,MySQL Engine不同,碎片化的原 ...

  6. MySQL表的四种分区类型

    MySQL表的四种分区类型 一.什么是表分区 通俗地讲表分区是将一大表,根据条件分割成若干个小表.mysql5.1开始支持数据表分区了. 如:某用户表的记录超过了600万条,那么就可以根据入库日期将表 ...

  7. MySQL表名和数据库关键字相同解决办法

    今天改他们的代码的时候,遇到了MySQL表名和数据库关键字的问题. 由于表名是关键字,导致增删改查都报错. Hibernate: select leave0_.id as id22_, leave0_ ...

  8. MySQL 表分区详解MyiSam引擎和InnoDb 区别(实测)

    一.什么是表分区通俗地讲表分区是将一大表,根据条件分割成若干个小表.mysql5.1开始支持数据表分区了.如:某用户表的记录超过了1000万条,那么就可以根据入库日期将表分区,也可以根据所在地将表分区 ...

  9. 清除mysql表中数据

    delete from 表名; truncate table 表名; 不带where参数的delete语句可以删除mysql表中所有内容,使用truncate table也可以清空mysql表中所有内 ...

随机推荐

  1. BZOJ4337:[BJOI2015]树的同构(树hash)

    Description 树是一种很常见的数据结构. 我们把N个点,N-1条边的连通无向图称为树. 若将某个点作为根,从根开始遍历,则其它的点都有一个前驱,这个树就成为有根树. 对于两个树T1和T2,如 ...

  2. 7.spring:SpringAOP(配置文件)

    SpringAOP(xml文件配置) 配置文件的方式,主要是在xml文件中进行配置,不使用注解! 目录: AtithmeticCalculator.java public interface Atit ...

  3. master分支合并

    一.Sourcetree简单介绍 通过Git可以进行对项目的版本管理,但是如果直接使用Git的软件会比较麻烦,因为是通过一条一条命令进行操作的.  Sourcetree则可以与Git结合,提供图形界面 ...

  4. MVC导航菜单高亮显示实现思路

    ///代码不是我写的,但是已经亲自测试过了,按照我的理解写的注释,不对的地方大家评论指出 @{ @*这个是把当前的路由值格式化并保存到currentController这个变量中,这里是格式化为Con ...

  5. LeetCode27.移除元素 JavaScript

    给定一个数组 nums 和一个值 val,你需要原地移除所有数值等于 val 的元素,返回移除后数组的新长度. 不要使用额外的数组空间,你必须在原地修改输入数组并在使用 O(1) 额外空间的条件下完成 ...

  6. Mybatis 原始dao CRUD方法

    用到的相关jar包及所用版本如下: 其中的Mybatis可以到github.com的网站下载 <project xmlns="http://maven.apache.org/POM/4 ...

  7. iPhone 横竖屏切换,全屏播放的三种方式

    1. 调用系统自带的强制屏幕旋转不过还得在AppDelegate中重写下面方法 - (UIInterfaceOrientationMask)application:(UIApplication *)a ...

  8. #leetcode刷题之路15-三数之和

    给定一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得 a + b + c = 0 ?找出所有满足条件且不重复的三元组. 注意:答案中不可以包含重复的三元组. ...

  9. 利用CSS3选择器实现表格的斑马纹

    要用到的Css3选择器 element:nth-child(number){ } 选择器匹配属于其父元素的第 number 个子元素 参数 Number odd 奇数 even 偶数 W3School ...

  10. SQL Server 2012 - 多表连接查询

    -- 交叉连接产生笛卡尔值 (X*Y) SELECT * FROM Student cross Join dbo.ClassInfo --另外一种写法 SELECT * FROM Student , ...