0

I am developing an integration API, each integrator will have his own channel, the number of channels < 1000.

Different channels will be stored different data which need to be indexed differently.

  1. Is it normal to have a collection in the database for each channel in order to speed up the search for the collection and not have many indexes for one collection?
  2. Are there any restrictions on the number of collections in the database?
  3. Will there be performance issues?
  4. Are there generally accepted approaches to solve this problem?
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
VoidName
  • 340
  • 2
  • 16
  • The answer will likely depend on what "different data" and "indexed differently" mean. – Joe May 12 '20 at 04:51
  • @Joe , `different data` is any json (each channel will have <= 10 variants of data), `different indexes` - index on some fields of json – VoidName May 12 '20 at 05:14
  • A collection can have 64 indexes. You might use partial or sparse indexes, and the documents having different fields is not a problem for mongo. – Joe May 12 '20 at 05:15
  • 64 indexes limit will become a problem, if I want to index data in 100 of channels (100 channels * 10 variants of data = 1000) – VoidName May 12 '20 at 05:18
  • sounds like you've arrived at an answer. – Joe May 12 '20 at 06:44
  • but question is about problems of approach with a lot of collections and alternatives – VoidName May 12 '20 at 06:51

0 Answers0