INSERT Performance - Bitmap vs B-Tree

。_饼干妹妹 提交于 2019-12-12 02:18:33

问题


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,


回答1:


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.



来源:https://stackoverflow.com/questions/41852423/insert-performance-bitmap-vs-b-tree

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!