2

If we put the select performance aside, which one is faster when it comes to insert. I couldn't find any thorough explanation for this. Can someone please explain? This question just labels bitmaps as inefficient but I want to know why.

Thanks,

Community
  • 1
  • 1
Emre Türkiş
  • 992
  • 9
  • 23

1 Answers1

4

Bitmap indexes can be problematic for inserts if there is contention. If you have a single thread doing the inserts they are fine, but if there are multiple threads doing inserts and perhaps updates and deletes they tend to limit performance due to locking.

A single key in the index may point to a large number of records, so when the index is changed many rows are locked.

As a general rule, go for normal indexes. In special cases bitmap indexes can shine - normally for read-mostly applications rather than OLTP systems.

ewramner
  • 5,810
  • 2
  • 17
  • 33