Sobes.tech
Junior — Middle

In which cases is creating indexes in a database undesirable or inefficient?

sobes.tech AI

Answer from AI

Creating indexes in a database can be undesirable or inefficient in the following cases:

  • For tables with very few records, where full scanning is faster than using an index.
  • If data is frequently modified (insertion, update, deletion), as indexes require additional time to update.
  • When there are many indexes on a single table, which slows down write operations.
  • For columns with low selectivity (few unique values), where an index will not improve query performance.

In such cases, indexes can degrade overall system performance.