0

Firestore documentation indicates that reads and writes are only counted per document. I however noticed my firestore has been reading data values contained in a document. Let’s say I have 10 documents each containing 5 values, when I fetch them the usage graph shows a total of 50 reads.

Why is this so?

vincent O
  • 518
  • 8
  • 33
  • 1
    Note that if you are monitoring your database through the Firebase console, the reads from the Firebase console are included in your read count. See: https://stackoverflow.com/a/62231297/3371862 – Renaud Tarnec Jun 09 '20 at 08:48
  • oh!!, that makes sense, because I thought along that line but, I would like to know, when I open the console, does it read the entire collection? because even when I have more than one collection, the usage increases – vincent O Jun 09 '20 at 12:07
  • I don't know precisely how is the Firestore console built, but I think it is nearly sure that the first displayed collection is entirely fetched, since we can see the docs. For the list of all the collections (the one in the left column), they most probably use "a tailor made approach" which only lists the collection names (e.g. a call to the REST API: https://cloud.google.com/firestore/docs/reference/rest/v1/projects.databases.documents/listCollectionIds) – Renaud Tarnec Jun 09 '20 at 13:30
  • Great mapping from the question to the likely source of the confusion Renaud! – Frank van Puffelen Jun 09 '20 at 13:36

0 Answers0