Junior — Middle
Could you list different types of indexes used in databases?
sobes.tech AI
Answer from AI
Databases use various types of indexes to speed up searches and optimize queries. The main types of indexes:
- B-Tree index — the most common type, suitable for quick searches, sorting, and range queries.
- Hash index — effective for exact key lookups but does not support range queries.
- Bitmap index — used for columns with a small number of unique values, often in analytical databases.
- Full-text index — designed for fast text searches, for example, in documents or articles.
- Spatial index — for geographic data, supports spatial queries.
Depending on the DBMS and the task, other specialized indexes may also be used. Choosing the right index significantly affects query performance.