当前位置:网站首页>Why can't fields with high duplicate values be indexed (such as gender fields)
Why can't fields with high duplicate values be indexed (such as gender fields)
2022-06-12 19:49:00 【WD Technology】
Conclusion ( With innodb For example )
a、 Non clustered indexes store references to primary keys , If select Field is not in a non clustered index , You need to jump to the primary key index ( In the above figure, jump from the index tree on the right to the index tree on the left ), Get more select field value
b、 If the non clustered index value has a high repetition rate , Then, when querying, there will be a large number of jumps from the right to the left in the above figure , The whole process is very slow
c、 If where Fields with high value repetition rate ,select It was used limit, Check only a few data , That is, when the number of jumps is very small , You can still build an index ( Later on, there was no need ,limit Limited quantity , Full table scanning is also fast , Unless the field values are sorted , All previous values must be scanned )
d、 without 3 This premise , It is not recommended to build an index on a field with a high value repetition rate , Because the query efficiency is low , You also need to maintain the index
边栏推荐
- 选电子工程被劝退,真的没前景了?
- 开源深度学习框架PlaidML安装及测试
- [observation] Huawei's next generation data center "adds momentum" to Guangxi's low-carbon and high-quality development
- 2022年最新宁夏建筑安全员模拟题库及答案
- Download and configuration of nuitka packaging tutorial
- Demand and business model innovation - demand 3- demand engineering process
- Jenkins中pipeline对接CMDB接口获取主机列表的发布实践原创
- Pyinstaller packaging tutorial packaging resource files
- 编程工具下载地址
- 运算器的基本结构
猜你喜欢
Reading small program based on wechat e-book graduation design (4) opening report
System log
开源深度学习框架PlaidML安装及测试
Demand and business model innovation - demand 2- demand basis
IO流基础知识详解--文件及IO流原理
【数字IC/FPGA】数据累加输出
选电子工程被劝退,真的没前景了?
Viewpoint sharing | Li Wei, an expert of Gewu titanium intelligent technology products: underlying logic and scenario practice of unstructured data platform
进程会计、进程时间、守护进程
exec函数、shell的实现
随机推荐
Low code enables rural construction to open "smart mode"
Wechat e-book reading applet graduation design work (6) opening defense ppt
Deep feature synthesis and genetic feature generation, comparison of two automatic feature generation strategies
Microsoft Word tutorial, how to insert a header or footer in word?
Installation and testing of open source deep learning framework plaidml
Mode of most elements (map, sort, random, Boyer Moore voting method)
基于微信电子书阅读小程序毕业设计毕设作品(7)中期检查报告
Original publishing practice of pipeline in Jenkins docking with CMDB interface to obtain host list
Fault analysis | a case of MySQL remote slave database replication delay
System log
Compilation of programs
[notes for question brushing] line segment tree
BannerViewPager
What is data driven
Demand and business model innovation-5-process
Details of thansmitablethreadlocal
Promise to solve hell function calls can be used infinitely
BigTable (II): how BigTable achieves scalability and high performance
进程的创建fork()、消亡wait()
Storage system overview