jeudi 23 août 2018

How to improve geospatial queries in MongoDB

I have about 10,000 documents in a collection which in Mongo shell has no problem quickly querying. However, in an app that works in a browser, the queries become very slow unless I set a limit at around 100. One way to improve query speed that I've been reading online is to create indexes, but geospatial indexes already exist as it must be created in the first place to query location. What would you do in this case to improve speed in the browser? Should I create indexes for everything else as well? I wanted to throw this out there to those who may have had a similar experience. Thanks for your thoughts.




Aucun commentaire:

Enregistrer un commentaire