Cost for sub collection read in a document Firestore

Viewed 101

I have structured my data in firestore as: Collection Reference: "Post" And each Post has Array of String as Images, Array of String as usersLiked, Caption.

So when I am try to read a Post, and that Particular Post has 3 image strings, and 3 userId's under usersLiked, how many reads do I get for:

  • images.length
  • usersLiked.length
  • checking usersLiked contains the userId of currentUser

Does each string in the sub collections count as one document read?

Thank you all for your help: I am a beginner and I would appreciate any help with advise on structuring my database efficiently in terms of cost and efficiency.

1 Answers
Related