Mysql show index解释

本文涉及的产品
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS PostgreSQL,集群系列 2核4GB
简介:

查看表上的索引状态:


SHOW INDEX returns table index information.


SHOW KEYS and SHOW INDEXES are synonyms for SHOW INDEX.


语法:


show {index|indexes} from table_name [ from db_name ] [where expr]


The following fields are returned by SHOW INDEX.


Field Description
Table Table name
Non_unique 1 if the index permits duplicate values, 0 if values must be unique.
Key_name Index name. The primary key is always named PRIMARY.
Seq_in_index The column's sequence in the index, beginning with 1.
Column_name Column name.
Collation Either A, if the column is sorted in ascending order in the index, or NULL if it's not sorted.
Cardinality Estimated number of unique values in the index. The cardinality statistics are calculated at various times, and can help the optimizer make improved decisions.
Sub_part NULL if the entire column is included in the index, or the number of included characters if not.
Packed NULL if the index is not packed, otherwise how the index is packed.
Null NULL if NULL values are permitted in the column, an empty string if NULL's are not permitted.
Index_type The index type, which can be BTREEFULLTEXTHASH or RTREE. See Storage Engine Index Types.
Comment Other information, such as whether the index is disabled.
Index_comment Contents of the COMMENT attribute when the index was created.


本文转自 wangergui 51CTO博客,原文链接:http://blog.51cto.com/wangergui/2074486,如需转载请自行联系原作者

相关实践学习
如何在云端创建MySQL数据库
开始实验后,系统会自动创建一台自建MySQL的 源数据库 ECS 实例和一台 目标数据库 RDS。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
3月前
|
关系型数据库 MySQL 测试技术
MySQL 报错 ERROR 1709: Index column size too large
MySQL 报错 ERROR 1709: Index column size too large
171 4
|
4月前
|
缓存 关系型数据库 MySQL
MySQL数据库——InnoDB引擎-架构-内存结构(Buffer Pool、Change Buffer、Adaptive Hash Index、Log Buffer)
MySQL数据库——InnoDB引擎-架构-内存结构(Buffer Pool、Change Buffer、Adaptive Hash Index、Log Buffer)
89 3
|
5月前
|
存储 关系型数据库 MySQL
MySQL的优化利器⭐️Multi Range Read与Covering Index是如何优化回表的?
本文以小白的视角使用通俗易懂的流程图深入浅出分析Multi Range Read与Covering Index是如何优化回表
|
5月前
|
SQL 关系型数据库 MySQL
【MySQL】脏读、不可重复读、幻读介绍及代码解释
【MySQL】脏读、不可重复读、幻读介绍及代码解释
|
5月前
|
SQL 关系型数据库 MySQL
mysql查询语句的访问方法const、ref、ref_or_null、range、index、all
mysql查询语句的访问方法const、ref、ref_or_null、range、index、all
|
5月前
|
关系型数据库 MySQL 索引
mysql中force index强制索引
mysql中force index强制索引
39 0
|
存储 SQL 缓存
一文带你了解MySQL之Adaptive Hash Index
在InnoDB体系架构图的内存结构中,还有一块区域名为:Adaptive Hash Index,翻译成中文:自适应哈希索引,缩写:AHI,它是一个纯内存结构,我们今天就来了解它。
1333 0
|
5月前
|
关系型数据库 MySQL
mysql 5.5.62版本建表语句报错: Index column size too large. The maximum column size is 767 bytes
mysql 5.5.62版本建表语句报错: Index column size too large. The maximum column size is 767 bytes
135 0
|
5月前
|
关系型数据库 MySQL 数据库
mysq优化---mysql执行计划解释、优化查询、数据库结构、服务器
mysq优化---mysql执行计划解释、优化查询、数据库结构、服务器
|
5月前
|
关系型数据库 MySQL
MySQL【问题 02】报错 1709 - Index column size too large. The maximum column size is 767 bytes. 可能是最简单的方法
MySQL【问题 02】报错 1709 - Index column size too large. The maximum column size is 767 bytes. 可能是最简单的方法
172 0
下一篇
无影云桌面