Middle
What are the advantages of hash indexes and B-tree indexes?
sobes.tech AI
Answer from AI
- Hash index:
- Very fast execution of exact match queries (
=). - Low memory consumption compared to B-tree for exact matches.
- Very fast execution of exact match queries (
- B-tree index:
- Efficient for range queries (
>,<,<=,>=), as well as forLIKEwith prefix and sorting (ORDER BY). - Supports exact match queries.
- Scales well with large volumes of data.
- Used by default in most DBMSs as it is more versatile.
- Efficient for range queries (