MongoDb ensureIndex on ObjectIds -


is worth while ensureindex on field have value of objectid?

basically have user collection , "stuff" collection. thing (single row) in stuff related user in collection. store objectid user in field in thing.

{    'thingtitle': 'title',    'owner': objectid(fromusercollection) } 

a user have multiple objects part. worth while put ensureindex on that? how ensureindex behave objectids?

if querying on field eg. db.thing_collection.find({user: userobjectid}) need index on field.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -