We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi.
I observed a very slow response of mongo while having a lot of thoughts in the system. The query behind the scene is doing something like:
db.getCollection('thoughts').find({}).sort({"time":-1}).limit(1500)
There is no index on reverse time - so adding an index by:
db.thoughts.createIndex({"time":-1})
speeded the processing up to factor 10.
So you may add something like:
get('db.mongo.db').collection('thoughts').ensureIndex({app: 1, time: 1, key: 1}, done)
to indexes.js
There are some more of these missing indexes in there ... ;-)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi.
I observed a very slow response of mongo while having a lot of thoughts in the system.
The query behind the scene is doing something like:
db.getCollection('thoughts').find({}).sort({"time":-1}).limit(1500)
There is no index on reverse time - so adding an index by:
db.thoughts.createIndex({"time":-1})
speeded the processing up to factor 10.
So you may add something like:
get('db.mongo.db').collection('thoughts').ensureIndex({app: 1, time: 1, key: 1}, done)
to indexes.js
There are some more of these missing indexes in there ... ;-)
The text was updated successfully, but these errors were encountered: