当前位置:网站首页>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.
边栏推荐
- Module 8 fonctionnement
- QT -- how to get the contents of selected cells in qtableview
- 进程会计、进程时间、守护进程
- 基于微信电子书阅读小程序毕业设计毕设作品(5)任务书
- How mysterious is "PIP not an internal or external command, nor a runnable program or batch file"
- Reading small program based on wechat e-book graduation design (4) opening report
- Pyinstaller packaging tutorial packaging resource files
- Reading small programs based on wechat e-book graduation design works (7) Interim inspection report
- [observation] Huawei's next generation data center "adds momentum" to Guangxi's low-carbon and high-quality development
- Continuously improve the overall performance of adaoracle Oracle Oracle
猜你喜欢

Negative remainder problem

Méthode de sauvegarde programmée basée sur la base de données distribuée elle - même

The latest Ningxia construction safety officer simulation question bank and answers in 2022

Viewpoint sharing | Li Wei, an expert of Gewu titanium intelligent technology products: underlying logic and scenario practice of unstructured data platform

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

Demand and business model innovation - demand 2- demand basis

Equipment management - borrowing and returning module 1

Reading small program graduation design based on wechat e-book (5) assignment

system()

How do I create my own appender in log4j- How to create my own Appender in log4j?
随机推荐
基于微信电子书阅读小程序毕业设计毕设作品(3)后台功能
从16页PPT里看懂Jack Dorsey的Web5
QT -- how to get the contents of selected cells in qtableview
JDBC interface summary
运算器的基本结构
什么是数据驱动
模块八作业
Demand and business model innovation-5-process
Microsoft Word 教程,如何在 Word 中插入页码、目录?
Unsupported class file major version 60
How mysterious is "PIP not an internal or external command, nor a runnable program or batch file"
Typescript decorator is basically used
进程的创建fork()、消亡wait()
The execution results of i+=2 and i++ i++ under synchronized are different
开源深度学习框架PlaidML安装及测试
基于微信电子书阅读小程序毕业设计毕设作品(5)任务书
基於分布式數據庫本身的定時備份方法
【刷题笔记】线段树
Wechat e-book reading applet graduation design completion works (3) background function
asp. Net using JSON to interact with API data