Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How am I billed in Firestore for a whereEqualTo query?

I have a collection of 100 elements. In this collection, only two elements have the field available set to true. If I use this query:

db.collection("elements").whereEqualTo("available", true);

I get 2 elements. Am I billed with 2 read operations or 100?

Thanks

like image 261
Johans Bormman Avatar asked Mar 04 '23 12:03

Johans Bormman


2 Answers

You are going to be billed for two reads.

You will find more details in this official video: https://www.youtube.com/watch?v=6NegFl9p_sE&, in particular at 2 min 18 sec.

like image 136
Renaud Tarnec Avatar answered Apr 01 '23 19:04

Renaud Tarnec


You are billed a read for each document returned from the query that originated at the server (not read from local cache).

like image 40
Doug Stevenson Avatar answered Apr 01 '23 20:04

Doug Stevenson