0:00
0% complete
LearnStep 1 of 2
Query Processing
Learning Objectives
- •Understand query processing stages
- •Learn query optimization
Lesson Outline
LearnStep 1/2
Query Processing
Query Optimization
1. Rule-Based Optimization
2. Cost-Based Optimization
Join Algorithms
| Algorithm | Cost | Best For |
|---|---|---|
| Nested Loop | O(N×M) | Small tables, indexed inner |
| Hash Join | O(N+M) | Equality joins, no index |
| Merge Join | O(N log N + M log M) | Sorted data, range joins |
EXPLAIN Plan
sql