title: 120 mongodb collections vs single collection - which one is more efficient?
body: <p>I'm new to mongodb and I'm facing a dilemma regarding my DB Schema design:</p>
  
  <p>Should I create one single collection or put my data into several collections (we could call these categories I suppose).</p>
  
  <p>Now I know many such questions have been asked, but I believe my case is different for 2 reasons:</p>
  
  <ul>
  <li>If I go for many collections, I'll have to create about 120 and that's it. This won't grow in the future.</li>
  <li>I know I'll never need to query or insert into multiple collections. I will always have to query only one, since a document in collection X is not related to any document stored in the other collections. Documents may hold references to other parts of the DB though (like userId etc).</li>
  </ul>
  
  <p>So my question is: could the 120 collections improve query performance? Is this a useful optimization in my case?</p>
  
  <p>Or should I just go for single collection + sharding? </p>
  
  <p>Each collection is expected hold millions of documents. If use only one, it will store billions of docs.</p>
  
  <p>Thanks in advance!</p>
  
  <p>------- Edit:</p>
  
  <p>Thanks for the great answers.</p>
  
  <p>In fact the 120 collections is only a self made limit, it's not really optimal:</p>
  
  <p>The data in the collections is related to web publishers. There could be millions of these (any web site can join).</p>
  
  <p>I guess the ideal situation would be if I could create a collection for each publisher (to hold their data only). But obviously, this is not possible due to mongo limitations.</p>
  
  <p>So I came up with the idea of a fixed number of collections to at least distribute the data somehow. Like: collection "A_XX" would hold XX Platform related data for publishers whose names start with "A".. etc. We'll only support a few of these platforms, so 120 collections should be more than enough. </p>
  
  <p>On another website someone suggested using many databases instead of many collections. But this means overhead and then I would have to use / manage many different connections.</p>
  
  <p>What do you think about this? Is there a better solution? </p>
  
  <p>Sorry for not being specific enough in my original question.</p>
  
  <p>Thanks in advance</p>