Sobes.tech
Junior — Middle

Can you list the main types of indexes used in databases?

sobes.tech AI

Answer from AI

Main types of indexes in databases:

  • B-Tree index — the most common type, suitable for fast search, sorting, and range queries.
  • Hash index — effective for exact key searches, but does not support range queries.
  • Bitmap index — used for columns with a small number of unique values, such as gender or status.
  • Full-text index — designed for full-text search on text fields.
  • Spatial index — used for geographic data and spatial queries.

The choice of index type depends on the nature of the data and the types of queries to the database.