Rearranging Relational Algebra Expressions
Why is this faster?
- There is probably an index on Artist(name).
- So finding an Artist is very fast.
- There is almost certainly an index on Album(artist_id),
(because it is an FK),
so lookup with an artist_id is very fast.
How much faster?
A lot. Probably 2-3 orders of magnitude (with large amounts of data).
|