MongoDB: BIllions of documents in a collection

前端 未结 2 1388
[愿得一人]
[愿得一人] 2021-01-29 19:44

I need to load 6.6 billion bigrams into a collection but I can\'t find any information on the best way to do this.

Loading that many documents onto a single primary key

2条回答
  •  [愿得一人]
    2021-01-29 20:35

    You can absolutely shard data in MongoDB (which partitions across N servers on the shard key). In fact, that's one of it's core strengths. There is no need to do that in your application.

    For most use cases, I would strongly recommend doing that for 6.6 billion documents. In my experience, MongoDB performs better with a number of mid-range servers rather than one large one.

提交回复
热议问题