MySQL 8.0.18 Hash Join does not support left/right join left and right join issues

MySQL 8.0.18 Hash Join does not support left/right join left and right join issues

In MySQL 8.0.18, a new Hash Join function was added, which is applicable to fields that are not indexed and can perform equal-value association queries. In previous versions, if the connected fields were not indexed, the query speed would be very slow and the optimizer would use the BNL (block nested) algorithm.

The Hash Join algorithm stores the data of a small table in a hash table in memory, matches the data in the large table row by row, calculates the hash value, and returns the qualified data from the memory to the client.

Use sysbench to generate four tables and delete the default k-field index.

We can use explain format=tree command to see that the hash join algorithm has been used.

However, the current version 8.0.18 only supports join. Left join and right join are invalid, please note this.

Summarize

The above is what I introduced to you about the MySQL 8.0.18 Hash Join not supporting left/right join. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • mysql join query (left join, right join, inner join)
  • SQL four types of joins - left outer join, right outer join, inner join, full join detailed explanation
  • MySQL table LEFT JOIN left join and RIGHT JOIN right join example tutorial
  • Examples of using MySQL left and right inner joins
  • In-depth understanding of the four types of SQL joins - left outer join, right outer join, inner join, full join
  • SQL left join and right join usage tips (left join and right join)
  • mysql left join, right join and inner join
  • How to write a SQL statement for a three-table left join query
  • SQL left join and right join principle and example analysis

<<:  How does WeChat Mini Program obtain user information and user phone number at the same time

>>:  Solution to ElementUI's this.$notify.close() call not working

Recommend

jQuery plugin to implement minesweeper game (2)

This article shares the second article of using j...

Summary of various methods for JavaScript to determine whether it is an array

Table of contents Preface Array.isArray construct...

Diagram of the process of implementing direction proxy through nginx

This article mainly introduces the process of imp...

CSS3 uses transform to create a moving 2D clock

Now that we have finished the transform course, l...

Detailed explanation of how Node.js middleware works

Table of contents What is Express middleware? Req...

Several methods to clear floating (recommended)

1. Add an empty element of the same type, and the...

Example of how to use CSS3 to layout elements around a center point

This article introduces an example of how CSS3 ca...

Let you understand the deep copy of js

Table of contents js deep copy Data storage metho...

Detailed explanation of mixed inheritance in Vue

Table of contents The effect of mixed inheritance...

MySQL DML statement summary

DML operations refer to operations on table recor...

Summary of Several Methods for Implementing Vertical Centering with CSS

In the front-end layout process, it is relatively...

How to install mongodb 4.2 using yum on centos8

1. Make a repo file Refer to the official install...