mysql表的核心元数据

Posted 友哥

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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 |          0 | PRIMARY      |            1 | id          | A         |       24290 |     NULL | NULL   |      | BTREE      |         |               |
| recordsInRangeTest |          1 | idx_name     |            1 | name        | A         |          12 |     NULL | NULL   | YES  | BTREE      |         |               |
| recordsInRangeTest |          1 | idx_age      |            1 | age         | A         |          12 |     NULL | NULL   | YES  | BTREE      |         |               |
| recordsInRangeTest |          1 | idx_age_name |            1 | name        | A         |          12 |     NULL | NULL   | YES  | BTREE      |         |               |
| recordsInRangeTest |          1 | idx_age_name |            2 | age         | A         |          22 |     NULL | NULL   | YES  | BTREE      |         |               |
+--------------------+------------+--------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
5 rows in set (0.00 sec)

表本身的

+--------------------+--------+---------+------------+-------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+---------+
| 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 |      10 | Compact    | 24290 |             65 |     1589248 |               0 |      1425408 |   4194304 |          28660 | 2018-06-09 09:29:26 | NULL        | NULL       | latin1_swedish_ci |     NULL |                |         |
+--------------------+--------+---------+------------+-------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+---------+

 

以上是关于mysql表的核心元数据的主要内容,如果未能解决你的问题,请参考以下文章

有赞数据仓库元数据系统实践

sqlite元数据

自己动手写数据库:实现数据库表的元数据管理

自己动手写数据库:实现数据库表的元数据管理

怎么查看mysql表是不是被锁定

MySQL元数据查询