In Firestore documentation said:
There are no additional costs for using cursors, page tokens, and limits. In fact, these features can help you save money by reading only the documents that you actually need.
But the following queries produce 80 reads:
val query = collection.orderBy("name")
query.limit(30).get(Source.SERVER).continueWithTask {
query.limit(20).get(Source.SERVER)
}.continueWith {
val doc = it.result!!.documents[5]
query.startAfter(doc).limit(30).get(Source.SERVER)
}
I expect only 35 reads as second query start from the same point as first and reads only 20 documents which already read by first query. And third query start from the 5th document so it reads 5 new documents. Also if I run any of this queries multiple times reads count will increase as if I run it only one time. For example if i run first query 5 times reads count will increase only by 30 not 150 as expected by me.
This queries differ only by limits which as said in documentation do not have additional costs for using. Why they produse additional reads(on usage tab at firebase console)? Maybe this reads won't be charged?
Thanks!
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)