Organizational Research By

Surprising Reserch Topic

mongodb unique index vs compound index


mongodb unique index vs compound index  using -'mongodb,mongodb-indexes'

Assume a hypothetical document with 3 fields:


_id : ObjectId
emailAddress : string
account : string


Now, given a query on emailAddress AND account, which of the following two indexes will perform better:


Unique index on emailAddress alone (assume it is a unique field)
Compound index on account and emailAddress

    
asked Oct 13, 2015 by maurya
0 votes
4 views



Related Hot Questions



Government Jobs Opening


...