Recommand · October 16, 2021 0

Number of READS in firestore and the basis of its calculation

I still fail to understand the calculation of no. of reads on Firestore. Just as an experiment, I just sat a the Firestore console without doing anything, no devices connected, no mobile, no emulator nothing, and the no. of reads registered in under the usage TAB was about 600 reads in about 10 minutes. So my guess is, if it’s a real app out there, 50000 reads will be breached in no time at all! Can someone please explain FIRESTORE READS and its fundamentals?

The number of reads in Firestore is always equal to the number of documents that are returned by a query. Let’s say you have a collection of 1 MIL documents, but your query only returns 10 documents, then you’ll have to pay only 10 document reads.

If your query yields no results, according to the official documentation regarding Firestore pricing, it said that:

Minimum charge for queries

There is a minimum charge of one document read for each query that you perform, even if the query returns no results.

Those unexpected reads most likely come from the fact that you are using the Firebase console. All operations that you perform in the console are counted towards the total quota. So please remember to not keeping your Firebase console open, as it is considered another Firestore client that reads data. So you’ll be also billed for the reads that are coming from the console.