Comparing MongoDB spatial indexes for proximity queries

Mahmoud Hammadi, Charef Abdallah Bensalloua

Abstract


In this paper, we empirically compare MongoDB's three main geographical indexes: 2d, 2dsphere, and Geohash. We look at different data volumes and geographic distributions. Our goal is to see how each index behaves in practice. We assess the effects of spatial density (dense urban, suburban, and rural regions) on index reaction time, memory use, and construction time using a repeatable technique based on real-world OpenStreetMap datasets. The findings demonstrate that while Geohash provides useful flexibility in less populated regions, the 2dsphere index is best suited for dense metropolitan environments because of its geometric precision. For historical applications that span tiny, flat regions, the 2d index is still useful. Along with the code and data to reproduce the test, we offer useful suggestions for architects and developers.

Keywords


Comparative evaluation; MongoDB; Performance; Proximity queries; Spatial indexing;



DOI: http://doi.org/10.11591/ijeecs.v44.i1.pp41-48

Refbacks

  • There are currently no refbacks.


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Indonesian Journal of Electrical Engineering and Computer Science (IJEECS)
p-ISSN: 2502-4752, e-ISSN: 2502-4760
This journal is published by the Institute of Advanced Engineering and Science (IAES).

shopify stats IJEECS visitor statistics