Given two different indexing techniques, indexing with trees (b+trees) and indexing with hash indexes. Which indexing technique is the best suited for each of the queries below (the the correct index per attribute)?
You can assume the simple case that the B+Tree has a height of more than 4 and that the hash-table does not have any overflows.
Moreover, the Person.id
is the primary key of the relation.
-Hash tables do not support range queries
-You can only access elements by their primary key with a hash table
-Hash indexes are suitable for point lookups (equality queries)
For those reasons, the answers should be:
1st query _ age _ b+ tree
2nd query _ age _ b+ tree
_ id _ hash-index