When you execute a SQL JOIN, the database engine has several strategies at its disposal.
The choice of algorithm can make the difference between a query taking milliseconds or minutes.
- Nested Loop Join
- Hash Join
- Merge Join
Each has its strengths and weaknesses depending on the size of the tables and available indexes.