Database Systems
Committing your transactions…
Initializing Sorting Algorithms...
Sorting
Trees
Graphs
Preparing interactive visualizations...
Database Systems
Committing your transactions…
The same JOIN can be computed three ways. Run each on the same two tables and count the comparisons it spends.
Click Play to begin.
The query optimizer picks among these using table statistics — the same cost-based choice shown in How a Database Query Executes.
Question 1 of 3
Two tables of 10,000 rows each are joined on an equality condition, with no indexes and plenty of memory. Which join is usually fastest?