
















































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

















































































parse
Query rewriting
Physical plan generation
execute result
SQL query
parse tree
statistics logical query plan
physical query plan
2; 16.
3; 16.2,16.
1; 13, 15
4; 16.4—16.
Nested Loop Join (NLJ)
B C a 10 a 20 b 10 d 30
10 cat 40 dog 15 bat 20 rat
A index
10 10 35 19 19 19 19 42 37
Examples
Implementing Tuple-at-a-time Operators
Implementing a Full-Relation Operator, Ex: Sort
Two-phase Sort: Phase 1
Suppose B(R) = 1000, R is clustered, and M = 100
1 2 3 4 5
999 1000
1 2 3 4 5
96 97 98 99 100 Memory
1 101
100 200 201 300
801 900 901^1000
Sorted Sublists
R