Skip to content
New issue

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

Queries are slow for large document collections #297

Open
laserval opened this issue Jan 10, 2014 · 0 comments
Open

Queries are slow for large document collections #297

laserval opened this issue Jan 10, 2014 · 0 comments
Labels

Comments

@laserval
Copy link
Contributor

When documents are input faster than Hydra consumes them, they will be stored in MongoDB. As the documents collection grows, queries against it get slower (as is expected).

exists and equals is affected badly by this, slowing to take seconds when document counts reach 100 000+. MongoDb recommends putting indices on fields queried like this, but that can't be done with the current document store model (as there are too many values for all content fields).

To speed this up, and other queries like it, we could store a list of fields in MongoDB alongside the content map and put an index on it. The exists query would then check that field instead of the content map. This requires changing MongoQuery and MongoDocument.

For equals there is little we can do from Hydra. The user can feel free to put an index on the content field in question in MongoDB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant