0

I have A firebase firestore project in which I store users data. As we know that there is limitation on document of 1MB by firebase. So my question is that I want to create 1 Document and inside it 1 new sub-collection and then create 1 new document inside that sub-collection and then storing some data in that last document. Example:

registered_user (Doc) > mis_data (Sub_col) > last_visits (Doc)

Now if in any case my "last_visists" document exceed its 1MB limit, dose this limit also effect the main "registered_users" document? or this 1MB limit just impact the only "last_visits" document?

In Short

Does sub-collection document 1MB limit do impact on the previous collection and document or it only impact it self?

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
Humayun MHA
  • 363
  • 3
  • 6

1 Answers1

2

I read this another question regarding this question on StackOverFlow and got some answer that

sub-collection doesn't count towards the 1 MiB limitation of the document. Besides that, all documents within that sub-collection have their own 1 MiB maximum limitation.

Humayun MHA
  • 363
  • 3
  • 6