Home > Mobile >  How to compute for the estimated billing for the read and writes?
How to compute for the estimated billing for the read and writes?

Time:04-17

I have 3 collections: classifications, items, and orders. Under items, I have a subcollection that stores the modifications made in the items.

Under classification, I have around 6 documents, each would have 3 fields. For the items, I have around let's 10 documents with 5 fields each. Under the items, is a subcollection that will store any modification made in items. For the orders, there could be a lot of documents under these.

How can I estimate the billing for the read and writes per month assuming that there's only 1 user?

CodePudding user response:

You are charged based on the number of documents that you retrieve from Firestore irrespective of number of fields in them. In this case, if that user fetches all the documents from all these collections, then you'll you'll charged 3 10 N reads where N is number of documents in orders collections.

If the users retrieved all these documents M times a day, then you'll be charged M × (3 10 N) reads.

However you have offline persistence enabled, then you are not charged for documents that were fetched from local cache.

  • Related