Get the App
SLTechnology News&Howtos  ›  Database  › 

How to solve the problem that MySQL8.0.18 Hash Join does not support left/right join left and right connection

Shulou Source: shulou.com Published: 2022-05-31 20:30:25 10月03日 Update

This article mainly describes how to solve MySQL8.0.18 Hash Join does not support left/right join left and right join problems, the article is very detailed, has a certain reference value, interested friends must read!

In MySQL 8.0.18, a new Hash Join feature was added, which is suitable for fields that have not been indexed to do equivalent association queries. In previous versions, queries were slow if the joined fields were not indexed, and the optimizer used the BNL (Block Nested) algorithm.

Hash Join algorithm is to store a small table of data into a hash table in memory, and line by line to match the data in the large table, calculate the hash value and return the qualified data from memory to the client.

Use sysbench to generate 4 tables and remove the default k field index.

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

However, version 8.0.18 only supports join. The left and right joins are disabled, please note here.

The above is "How to solve MySQL8.0.18 Hash Join does not support left/right join left and right join problems" All the contents of this article, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!

Tags: Support fields data algorithms indexes questions memory content versions articles hashes queries values interests commands clients clients guys buddies new features Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi macOS Docker Linux Huawei