简体   繁体   中英

Firebase read calculations for document queries?

Quick question about how firestore reads are calculated. Say I have a collection with 100 items in it, and I do

citiesRef.order(by: "name").limit(to: 3)

This would technically have to look at all 100 items, order them by name, and then return 3. Would this count for 3 reads or would it count for 100 reads, since we're looking at 100 items?

Thanks.

If the above query returns 3 documents then it would count as 3 reads.

You are charged for each document read, write, and delete that you perform with Cloud Firestore.

Charges for writes and deletes are straightforward. For writes, each set or update operation counts a single write.

Charges for reads have some nuances that you should keep in mind. The following sections explain these nuances in detail

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM