Firestore querysnapshot size

214 views
Skip to first unread message

Jean Omberto

unread,
Oct 31, 2020, 2:30:28 PM10/31/20
to fireba...@googlegroups.com

Good day,

Can someone let me know if there is a cost associated with checking the querysnapshot size ?
Eg a collection of 5000 documentsnapshots, checked using the size property, is there any read-cost for that?

I don't seem to find that on the billing documentation page at :

https://firebase.google.com/docs/firestore/pricing

Regards,
Jean.

Sam Stern

unread,
Nov 2, 2020, 5:34:44 AM11/2/20
to Firebase Google Group
Hi Jean,

Fetching a snapshot with 5000 documents from the server will cost 5000 reads ($0.009 in a US multiregion).  Calling .size() on the snapshot does not affect that cost at all, that's a local operation.

- Sam

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CACP%2B_1ijeszV%3Dhihw58fRhvmNL5JP%3D1qRLDaBYmXfy_vaOH3Yg%40mail.gmail.com.

Jean Omberto

unread,
Nov 2, 2020, 5:44:26 AM11/2/20
to fireba...@googlegroups.com

Hallo Sam,
Thank you for the explanation.
It is enlightening to know that getting the snapshot size alone doesn't cost a dime.
Again, thanks
Jean.

On 2 Nov 2020 12:34, "'Sam Stern' via Firebase Google Group" <fireba...@googlegroups.com> wrote:
Hi Jean,

Fetching a snapshot with 5000 documents from the server will cost 5000 reads ($0.009 in a US multiregion).  Calling .size() on the snapshot does not affect that cost at all, that's a local operation.

- Sam

On Sat, Oct 31, 2020 at 6:30 PM Jean Omberto <ombe...@gmail.com> wrote:

Good day,

Can someone let me know if there is a cost associated with checking the querysnapshot size ?
Eg a collection of 5000 documentsnapshots, checked using the size property, is there any read-cost for that?

I don't seem to find that on the billing documentation page at :

https://firebase.google.com/docs/firestore/pricing

Regards,
Jean.

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CAHafJBoYSaV6od_n%2BU20LoFJvqHx8EVFW-riHNz1mkMNoLg4ow%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages