当前位置:网站首页>What is a federated index?
What is a federated index?
2022-06-12 19:49:00 【WD Technology】
It refers to indexing multiple columns on a table , The union index is also a B+ Trees , The difference is that the number of key values in the union index is not 1, But greater than or equal to 2.
Left most matching principle
Assume that the joint index of the above figure is (a,b). The union index is also a B+ Trees , The difference is B+ The tree is indexing a Sort on the basis of , On the index b Sort . So the data follows (1,1),(1,2)… Sequential discharge .
about selete * from table where a=XX and b=XX, Obviously it can be used (a,b) Joint index ,
about selete * from table where a=XX, It can also be used (a,b) Joint index . Because in both cases , The data in the leaf node is ordered .
however , about b Column query ,selete * from table where b=XX. You cannot use this tree B+ Tree index . Leaf nodes can be found b The value is 1,2,1,4,1,2. Obviously not orderly , So it can't be used (a,b) Joint index .
By the way:selete * from table where b=XX and a=XX, You can also use the union index , You may have questions , This statement does not conform to the leftmost matching principle . This is due to the existence of the query optimizer ,mysql The query optimizer will determine to correct this sql In what order statements should be executed most efficiently , Finally, a real execution plan is generated . therefore , Of course, we can make full use of the query order efficiency of the index , therefore mysql The query optimizer will eventually execute queries in this order .
Optimize : Put the column with the highest selectivity at the top of the index in the federated index .
for example : In a company with age and gender Index , obviously age Put it in front , Because there are two choices of gender, male or female , Less selective age.
边栏推荐
- 【GAMES101】课堂笔记8–着色(着色频率、图形管线、纹理映射)
- Module 8 fonctionnement
- 基于微信电子书阅读小程序毕业设计毕设作品(1)开发概要
- Detailed explanation of IO flow basic knowledge -- file and IO flow principle
- Leetcode topic [string]-344- reverse string
- IO流基础知识详解--文件及IO流原理
- Demand and business model innovation-4-strategy
- Deep feature synthesis and genetic feature generation, comparison of two automatic feature generation strategies
- [blockbuster release] ant dynamic card, enabling the app home page to realize agile update
- 合理地配置线程池
猜你喜欢
![[generation confrontation network learning III] reading notes of Bigan paper and its principle understanding](/img/6b/0f0815e20cdf6da28793562bcaede1.png)
[generation confrontation network learning III] reading notes of Bigan paper and its principle understanding

Using / developing private plug-ins in traifik proxy 2.5 (traifik official blog)

Reading small program based on wechat e-book graduation design (4) opening report

Unsupported class file major version 60

Add, delete, modify and query mysql, common MySQL commands

Shell programming regular expressions and metacharacters

Experience Technology Department of ant group launched the 2023rd school recruitment

torch 网络模型转换onnx格式,并可视化

Demand and business model analysis-2-business model types

解释器文件
随机推荐
Demand and business model analysis-2-business model types
Jenkins中pipeline对接CMDB接口获取主机列表的发布实践原创
MySQL日志
Learning summary in March
编程工具下载地址
Business opportunities with an annual increase of 3billion - non cage eggs or a new blue ocean for export to ASEAN
Mode of most elements (map, sort, random, Boyer Moore voting method)
模塊八作業
基于分布式数据库本身的定时备份方法
负数取余问题
Wechat e-book reading applet graduation design work (6) opening defense ppt
[games101] class note 8 - shading (shading frequency, graphics pipeline, texture mapping)
typescript的装饰器(Decorotor)基本使用
First build green, then build city
Microsoft Word 教程,如何在 Word 中插入页码、目录?
Original publishing practice of pipeline in Jenkins docking with CMDB interface to obtain host list
Viewpoint sharing | Li Wei, an expert of Gewu titanium intelligent technology products: underlying logic and scenario practice of unstructured data platform
Negative remainder problem
2022年,中国大学生最多的20个城市
META-INF、WEB-INF分别是什么?