Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

firestore read count with where condition -indexed [duplicate]

firestore documentation pricing didn't mention the read on indexed data with where conditions..

if we have a collection (invoice) with 100K docs with fields like (date, number,amount)

and i did a query get().where('date' , '==', 20180404') is this will count the 100K or only returned docs?

thanks

like image 684
Mohammad Shraim Avatar asked Apr 09 '18 22:04

Mohammad Shraim


1 Answers

Queries use indexes, they don't read every individual document. You'll get charged based on the number of documents returned, not on the size of the collection.

Also see Todd's answer here, which I'm actually going to mark your question as a duplicate of.

like image 154
Frank van Puffelen Avatar answered Sep 19 '22 00:09

Frank van Puffelen