当前位置:网站首页>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.
边栏推荐
- 【刷题笔记】线段树
- 基于微信电子书阅读小程序毕业设计毕设作品(3)后台功能
- vc hacon 聯合編程 GenImage3Extern WriteImage
- Business opportunities with an annual increase of 3billion - non cage eggs or a new blue ocean for export to ASEAN
- Hardware test - why not use grounding clip for ripple test
- const
- Demand and business model analysis-2-business model types
- torch 网络模型转换onnx格式,并可视化
- 今晚7:00 | PhD Debate 自监督学习在推荐系统中的应用
- BannerViewPager
猜你喜欢

基于微信电子书阅读小程序毕业设计毕设作品(7)中期检查报告

基于微信电子书阅读小程序毕业设计毕设作品(3)后台功能

什么是数据驱动

Demand and business model innovation-5-process

从16页PPT里看懂Jack Dorsey的Web5

What is data driven

Deep feature synthesis and genetic feature generation, comparison of two automatic feature generation strategies

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

基于分布式数据库本身的定时备份方法

How mysterious is "PIP not an internal or external command, nor a runnable program or batch file"
随机推荐
Shell arrays and functions
基于微信电子书阅读小程序毕业设计毕设作品(6)开题答辩PPT
2022年最新宁夏建筑安全员模拟题库及答案
First build green, then build city
5g R17 standard is frozen. What does it say?
Macro definitions and functions
基于微信电子书阅读小程序毕业设计毕设作品(7)中期检查报告
Negative remainder problem
JDBC interface summary
【生成对抗网络学习 其三】BiGAN论文阅读笔记及其原理理解
Mode of most elements (map, sort, random, Boyer Moore voting method)
Ctfshow-web266 (deserialization)
What are meta-inf and WEB-INF respectively?
基于微信电子书阅读小程序毕业设计毕设作品(8)毕业设计论文模板
Since using low code development, the development efficiency has been increased by 10 times
今晚7:00 | PhD Debate 自监督学习在推荐系统中的应用
Download and configuration of nuitka packaging tutorial
BannerViewPager
META-INF、WEB-INF分别是什么?
Axure RP 9 for Mac(交互式产品原型设计工具)中文版