Home > database >  Mongo 2 kinds of data storage, a storage solution that best?
Mongo 2 kinds of data storage, a storage solution that best?

Time:09-17

The first kind of {num: 1}, {num: 2}, {num: 3}

The second {num: [1, 2, 3]}

Both a storage solution that best, the best performance

CodePudding user response:

You this simple list these two forms, is not good to compare,
, I think it depends on both your data usage scenario, is alone to save the same types of values, or say these values is an attribute in a document, not the actual application scenarios, don't tell which is better,
Like directing design mode, is to use embedded mode or reference, this is depends on the specific business scenarios,
  • Related