Cloud Firestore: How Is Read Calculated?


Answer :

Since you're reading 10 documents, so you'll be charged for 10 document reads. The number of read API calls you use is not relevant here.

Also see:

  • Firestore read/write pricing; does .limit(25) counts as 25 reads or one?
  • Understanding Firestore Pricing
  • Firestore Pricing - Does The Amount Of Documents In A Collection Matters?
  • QuizApp - Firebase/ FireStore Reads

I did a bunch of testing of this and can confirm that the Firebase Database tab uses an insane amount of reads. For me it incurred a 600+ read count every single time I opened it. If I clicked off that tab and back onto it, I would get another 600+ hit on read count. I monitored the usage of this using the GCP Usage for Firestore so I could avoid having that window open.

This is an absurd cost, it has taken me into 100k+ reads by scrolling through it without realizing what was happening. You could even hit a million pretty easy if you were spending a lot of time in there doing something.

In addition, if you leave that tab open as you make calls, it throws your numbers WAY WAY off as it also shows real time updates.

Be very careful when and how you use these tools. Personally I don't think it makes sense to incur usage costs for using internal tools. Especially since they don't even tell you these tools will incur usage costs.


Comments

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?