What is the indexing penalty in CQEngine for a fast changing collection?

假如想象 提交于 2019-12-23 16:02:55

问题


I'm considering CQEngine for a project where I need to handle lots of real time events and execute some queries from time to time. It works well for returning the results but I noticed that the larger the collection gets the slower it becomes to add or remove elements to/from it.

I have a few simple indexes added on the collection so I'm assuming the delay is because on each event added/removed the indexes are updated. I also get an OutOfMemoryError on large numbers of events, from the indexes increasing along with the collection I think.

So my question is, what is the indexing penalty in CQEngine for a fast changing collection (elements often added and removed from the collection)?


回答1:


If you have a lot of unique values in attributes that you index, you would probably benefit from IndexQuantization discussed on the site.

This is a way to tune the tradeoff between memory usage and retrieval speed. But it's especially useful to reduce the size of indexes in memory, if you have a large number of unique values.

FYI you can also ask questions in the CQEngine discussion forum.

Hope that helps!



来源:https://stackoverflow.com/questions/23119394/what-is-the-indexing-penalty-in-cqengine-for-a-fast-changing-collection

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