I need to have in-memory two-dimensional index over data. Usage scenario:
Rare bulk writes - new elements will be added in large chunks, frequency of additions is very low comparing to reads.
Frequent reads. Range query (
a < x < b AND n < y < m) should be fast. I am not giving any metrics for what "fast" is, because it is evidently depends on many things that are out of the scope of this question.Data is all in-memory
I have tested a couple of options:
- Quadtree. Unfortunately, range query is not performant enough, especially in cases when it intersects multiple high-level quads.
- R-Tree. Though queries works faster than quadtree, it seems to me is too complex. Also, what I got from papers is that R-tree is oriented to work with paged data.
What are other options to be considered and which of them can give the highest range query performance?