Operator Symbol | Operation | Memory buffer requirement | # Disk I/O operations |
---|---|---|---|
σC(R) | selection | N/A (use one-pass algorithm) | N/A |
πattrs(R) | projection | N/A (use one-pass algorithm) | N/A |
δ(R) | duplicate elimination | M ≥ sqrt( B(R) ) | 3 B(R) |
γL(R) | grouping |
M ≥ sqrt( B(R) )
(sort on grouping attrs) |
3 B(R) |
R ∪ S | Union | M ≥ sqrt( B(R) + B(S) ) | 3 B(R) + 3 B(S) |
R ∩ S | Intersection | M ≥ sqrt( B(R) + B(S) ) | 3 B(R) + 3 B(S) |
R − S | Difference | M ≥ sqrt( B(R) + B(S) ) | 3 B(R) + 3 B(S) |
R × S | Product | N/A (use one-pass algorithm) | N/A |
R ⋈ S | Join |
M ≥ max(
sqrt(B(R)),
sqrt(B(S)) )
(and enough buffers to hold all tuples with a common value) |
5 B(R) + 5 B(S) |