当前位置:网站首页>MySQL two table connection principle (understand join buf)
MySQL two table connection principle (understand join buf)
2022-06-28 07:55:00 【star++】
summary
In general , We use mysql Both of them use two kinds of queries , One is single table query , One is multi table connection . The principle of multi meter connection is still very important , Especially the understanding of query optimization . How to connect multiple tables should be considered to be reasonable , It is necessary to know the principle of connection .
principle
1. Under normal conditions, the table is connected
1. Two tables stu and stu_score, That is to say, a form recording the basic information of students , A student record sheet
2. Now need join Two tables , hypothesis on Condition is stu.id=stu_score.stu_id As a condition of connection
3. be based on stu As a driving table , from id be equal to 1 Start of record , Then I draw it in the picture stu_score It's just
Cluster index , But the connection condition is stu_score.stu_id, Then only cluster indexes can be scanned , here stu
There are five records , So full scan stu Watch once , Each record is for connection ,
边栏推荐
- Airflow2.1.1 ultra detailed installation document
- SOC clock configuration
- sql主从复制搭建
- 22/02/15 study notes
- Ambari (V) ---ambari integrated Azkaban (valid for personal test)
- Airflow2.x distributed deployment DAG execution failure log cannot be obtained normally
- 8 figures | analyze Eureka's first synchronization registry
- 挖财注册开户靠谱吗?安全吗?
- Block transmission by golang gin framework
- HJ character count
猜你喜欢
随机推荐
Tencent continued to lay off staff in the second half of the year, and all business groups reduced by at least 10%. What do you think of this? Followers
Study notes 22/1/19 and 22/1/20
What is the lifecycle of automated testing?
HJ string sort
kubernetes集群命令行工具kubectl
asp. Net registration page
Es data export CSV file
A single node obtains the lock lock of the order number
Unity UI shadow component
[shangpinhui] project notes
Conversion between HJ integer and IP address
How redis solves cache avalanche, breakdown and penetration problems
asp. Net datalist to display product information and pictures
MMR rearrangement (similarity is calculated by editing distance and repeatability)
asp. Net error "/" server error in the application. String or binary data would be truncated. The statement...
Redis persistence problem and final solution
Explanation and application of instr() function in Oracle
Section Xi. Axi of zynq_ Use of DMA
Section 9: dual core startup of zynq
Ambari (VI) -- ambari API use