Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Query byId() reads in the entire collection from the db (mongodb) before selecting the one to return #58

Closed
Ziink opened this Issue · 3 comments

3 participants

@Ziink

This is with 'racer-db-mongo'. Obviously this inefficient and could cause major problems.

@switz

Did you try creating an index in your mongo database?

db.collection.ensureIndex( { "id": 1 }, {background: true})
@Ziink

Yes, I was querying against the '_id' field which is the primary index. I think that's what byId() searches on.

@nateps
Owner

No longer relevant in 0.5

@nateps nateps closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.