当前位置:网站首页>如何查看 MySQL 表的索引信息?
如何查看 MySQL 表的索引信息?
2022-06-27 16:16:00 【墨天轮】
show index from your_tablename;

Table:索引所在的表名;
Non_unique:0表示该索引是唯一索引,1表示该索引不是唯一索引;
Key_name:索引的名称;
Seq_in_index:索引列在索引中的位置,对于组合索引来说,这个字段很重要,具体可以查看《MySQL 中的索引》;
Column_name:索引列的名称;
Collation:索引列的值以什么方式存储在索引中。A 表示有排序,B+树索引使用该方式;NULL 表示无序的,Heap索引使用该方式;
Cardinality:索引列所有值去重后的数量。该值除以该表的行数越接近1越好,如果非常小,则需要考虑是否可以删除该索引;
Sub_part:数值 N 表示只对该列的前 N 个字符进行索引;NULL 表示索引整个列的值;
Packed:关键字是否被压缩,NULL 表示没有压缩;
Null:索引列是否可以为空
Index_type:索引类型,BTREE 表示B+树索引;
Comment:注释;
Index_comment:注释;
边栏推荐
- Sword finger offer 22 The penultimate node in the linked list
- TP5 restrict access frequency
- [fxcg] today's market analysis
- 【ELT.ZIP】OpenHarmony啃论文俱乐部—见证文件压缩系统EROFS
- Why should string be designed to be immutable?
- 建立自己的网站(10)
- 如何制作登录界面
- All you want to know about large screen visualization is here
- 时序数据库(Time Series Database)的存储引擎要想做到极致,还得自研
- SQLite net (SQLite is used by unity, WPF and WinForm)
猜你喜欢

Missing d3d10 How to repair DLL files? Where can I download d3d10.dll

Allocate aligned heap space

leetcode 92. Reverse linked list II

电子智慧套装教程

Alibaba cloud server is invaded

LeetCode 124. Binary tree maximum path sum - binary tree series question 8

Leetcode 5. Longest Palindromic Substring

Lvgl8.x migrating to stm32f4

d3dx9_ How to repair 32.dll? d3dx9_ Solution to 32.dll missing

Advanced learning of MySQL -- Application -- view, stored procedure, trigger
随机推荐
Related configuration commands of Huawei LACP
[JS reverse hundreds of examples] I love to solve 2022 Spring Festival problems and receive red envelopes
Oracle concept 3
建立自己的网站(10)
Part 32 supplement (32) string of ECMAScript
JXL export Excel
Asemi rectifier bridge kbp310 function pin diagram
黑马程序员-软件测试基础班-02-30-45工具代开浏览器运行代码,音、视频、测试点,音视频标签,布局标签。超链接语法进阶,绝对路径,相对路径
TP5 generates the most detailed two-dimensional code tp6 (also available)
Ten common methods of arrays tools
[UVM basics] set a monitor at the input port of the DUT to explain the necessity
Use lamda expression and stream flow to traverse map and list
JS event binding and common events
Some details of Huawei OSPF
Unity shadow shadow pancaking
Can the selectforupdateexecution in Seata obtain the global lock before executing SQL?
Teach you to use elastic search: run the first hello world search command
Why should string be designed to be immutable?
Advanced learning of MySQL -- Application -- Optimization of other SQL statements
Handwritten promise series - all