MySQL 8.0 Database Administrator — Question 129
Which condition is true about the use of the hash join algorithm?
Answer options
- A. No index can be used for the join.
- B. The query must access no more than two tables.
- C. The smallest of the tables in the join must fit in memory as set by join_buffer_size.
- D. At least one of the tables in the join must have a hash index.
Correct answer: B
Explanation
The correct answer is B because the hash join algorithm typically operates effectively with two tables, allowing for efficient processing. Option A is incorrect as hash joins do not require a specific index, C is wrong since larger tables can also be processed if they are partitioned, and D is false as a hash index is not a prerequisite for the hash join to function.