## Rearranging Relational Algebra Expressions
```
```
## How fast is this?Suppose there are N Artists and M Albums. Back-of-the-envelope calculation: - N × M pairs of rows to consider in computing the
join . - Output of
join has M rows. - As each output row is generated, check
select condition. - If true,
project on name.
So the time is O(N × M). Could be reduced to O(M) if both tables are stored in order
of |