8

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

Mohammad Shraim
  • 1,173
  • 12
  • 21

1 Answers1

12

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.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807