Home > Net >  flutter: I'm implementing group chat using firebase should I create a sub collection for each g
flutter: I'm implementing group chat using firebase should I create a sub collection for each g

Time:07-10

So let's say you have 3 or more courses like c#, c , java, and Python and you would like to implement some chatting feature on each course. Would you create like different collections to store their messages separately in cloud firestore then use where clause on let's say field =='python'? If subcollection could it be created automatically? (on first message sent maybe)

CodePudding user response:

For example you have 10 courses with 100 messages each the data it would send to each call is 1000 entries and if you have a separate collection then you get only 100 entries. It is always better to reduce the amount of data passed

  • Related