SQL Physical Joins Engine

Interactive evaluation of Nested Loop Join, Hash Join (Build & Probe phases), and Merge Join lockstep traversal.

Query Engine Execution Strategies

SQL Physical Joins Engine (Nested Loop, Hash, Merge)

Join Operator Optimization
Query: SELECT * FROM users u JOIN orders o ON u.id = o.user_id;hash-join
Phase 1: Build Phase (work_mem)
Hash Table created on smaller table (users):
• Bucket #42: [id: 1 ➔ Alice]
• Bucket #88: [id: 2 ➔ Bob]
Phase 2: Probe Phase
Streaming orders table and probing hash table:
✅ Match: order #101 (user_id: 1) ➔ Alice
✅ Match: order #102 (user_id: 2) ➔ Bob