Junior — Middle
Can you tell me about the types of indexes used in database management systems?
sobes.tech AI
Answer from AI
In database management systems (DBMS), different types of indexes are used to speed up data search and sorting. The main types of indexes:
-
B-Tree — the most common index type, supports fast search, insertion, and deletion. Used for equality and range queries.
-
Hash indexes — provide very fast exact match searches but do not support range queries.
-
Bitmap indexes — effective for columns with low cardinality (e.g., gender, status), use bitmaps for quick filtering.
-
Full-text indexes — designed for fast text search, support searching by words and phrases.
-
Spatial indexes — used for geographic data, e.g., R-Tree.
The choice of index type depends on the nature of the data and the types of queries to be performed.