Issues to Consider in Index Selection
Attributes mentioned in a WHERE clause are candidates for index search keys.
- Exact match condition suggests hash index.
- Range query suggests tree index.
- Clustering is especially useful for range queries, although it can help on equality queries as well in the presence of duplicates.
Try to choose indexes that benefit as many queries as possible. Since only one index can be clustered per relation, choose it based on important queries that would benefit the most from clustering.