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
Post a Comment