mysql表的核心元数据
索引的
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表的核心元数据的更多相关文章
- mysql:表注释和字段注释
mysql:表注释和字段注释 1 创建表的时候写注释 create table test1 ( field_name int comment '字段的注释' )comment='表的注释'; 2 修改 ...
- [转载]github在线更改mysql表结构工具gh-ost
GitHub正式宣布以开源的方式发布gh-ost:GitHub的MySQL无触发器在线更改表定义工具! gh-ost是GitHub最近几个月开发出来的,目的是解决一个经常碰到的问题:不断变化的产品需求 ...
- 利用Flume将MySQL表数据准实时抽取到HDFS
转自:http://blog.csdn.net/wzy0623/article/details/73650053 一.为什么要用到Flume 在以前搭建HAWQ数据仓库实验环境时,我使用Sqoop抽取 ...
- python 多线程删除MySQL表
一.需求分析 在<python 统计MySQL表信息>这篇博客中,链接如下: https://www.cnblogs.com/xiao987334176/p/9901692.html 已经 ...
- MySQL表的碎片整理和空间回收小结
MySQL表碎片化(Table Fragmentation)的原因 关于MySQL中表碎片化(Table Fragmentation)产生的原因,简单总结一下,MySQL Engine不同,碎片化的原 ...
- MySQL表的四种分区类型
MySQL表的四种分区类型 一.什么是表分区 通俗地讲表分区是将一大表,根据条件分割成若干个小表.mysql5.1开始支持数据表分区了. 如:某用户表的记录超过了600万条,那么就可以根据入库日期将表 ...
- MySQL表名和数据库关键字相同解决办法
今天改他们的代码的时候,遇到了MySQL表名和数据库关键字的问题. 由于表名是关键字,导致增删改查都报错. Hibernate: select leave0_.id as id22_, leave0_ ...
- MySQL 表分区详解MyiSam引擎和InnoDb 区别(实测)
一.什么是表分区通俗地讲表分区是将一大表,根据条件分割成若干个小表.mysql5.1开始支持数据表分区了.如:某用户表的记录超过了1000万条,那么就可以根据入库日期将表分区,也可以根据所在地将表分区 ...
- 清除mysql表中数据
delete from 表名; truncate table 表名; 不带where参数的delete语句可以删除mysql表中所有内容,使用truncate table也可以清空mysql表中所有内 ...
随机推荐
- GitBash初始目录的修改
GitBash初始目录是定为到用户目录的,例如: 所以,每次打开都要手动调试到仓库所在的目录,可以通过修改目标和起始位置来定位到仓储文件夹下. 再次打开git,完美~~
- mac使用brew安装配置常见测试工具
Homebrew 包管理工具可以让你安装和更新程序变得更方便,目前在 OS X 系统中最受欢迎的包管理工具是 Homebrew. 安装 在安装 Homebrew 之前,需要将 Xcode Comman ...
- win7下添加库文件出现“file is not regcognized”问题
最近几天需要画电路图,所以安装了protel se99,安装后在添加库文件的时候出现“file is not regcognized”的问题 百度查了一下,说win7基本上都会出现这个问题. 实际上, ...
- MySQL 开启事件 使用定时器调用存储过程
mysql定时器是系统给提供了event,而oracle里面的定时器是系统给提供的job.废话少说,下面创建表:create table mytable (id int auto_incremen ...
- webpack-dev-server 多入口自动刷新,支持对象
万物的来源~webpack 本身 watch webpack watch 传送门 webpack 可以监听文件变化,当它们修改后会重新编译 watch boolean 启用 Watch 模式.这意味着 ...
- 用jQuery实现(全选、反选、全不选功能)
在jQuery选择器的基础下我们实现一个全选,反选,全不选功能! <script type="text/javascript"> $(function ( ...
- 线上服务内存OOM问题定位三板斧
相信大家都有感触,线上服务内存OOM的问题,是最难定位的问题,不过归根结底,最常见的原因: 本身资源不够 申请的太多 资源耗尽 58到家架构部,运维部,58速运技术部联合进行了一次线上服务内存OOM问 ...
- Java : Spring基础 IOC
使用 ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml" ...
- Apache Spark on K8s的安全性和性能优化
前言 Apache Spark是目前最为流行的大数据计算框架,与Hadoop相比,它是替换MapReduce组件的不二选择,越来越多的企业正在从传统的MapReduce作业调度迁移到Spark上来,S ...
- JAVA 使用Comparator接口实现自定义排序
1.原则 Comparator接口可以实现自定义排序,实现Comparator接口时,要重写compare方法: int compare(Object o1, Object o2) 返回一个基本类型的 ...