All Products
Search
Document Center

Overview

Last Updated: Jun 18, 2021

A JOIN statement is used to combine the attributes of two or more tables in a database by their values based on the join conditions. The set generated by JOIN can be saved as a table or used as a table.

Join algorithms provide more options for SQL tuning. You can select a proper join algorithm based on the data characteristics of the table during SQL tuning, making it more efficient to join multiple tables.

Join statements are implemented by join algorithms, such as Nested Loop Join, Hash Join, and Merge Join The optimizer chooses the join algorithms automatically based on their benefits and drawbacks in different scenarios. For the principle of each algorithm, see Join algorithms.

OceanBase Database also enables you to control the selection of the join order and join algorithms by adding a hint to your query based on your needs.