Firestore 的 where 查询 - 读取次数收费
Firestore's where query - number of reads charged
这听起来可能很愚蠢,但我需要排除我的应用程序在 Firestore 上的文档读取背后的可能性。
客户端SDK使用where查询时,所有文档是下载到客户端再过滤还是在服务端过滤返回?
还有,我们用云函数where查询是什么情况?
例如:假设合集帖子有 1000 个文档,其中 10 个符合 where 查询中提到的条件,如果我使用
,我将按阅读次数付费
- 客户端 SDK 2) 云函数
When the where query is used using client SDK, are all the documents downloaded to the client and then filtered or they are filtered at the server and returned?
否,文件在服务器上被过滤。您只会获得代表查询结果的文档。
Also, what is the case when we use where query with cloud functions?
这和上面的完全一样。
Let's say collection posts have 1000 documents and 10 match the criteria mentioned in the where query, how many reads I would get charged for if I use
只有 10 个。您将始终按阅读的文档数量付费。例如,如果您的查询 returns 只有 10 个文档,则您只需按 10 个文档读取付费,仅此而已。请记住,您要搜索的文档数量并不重要,重要的是您查询的文档数量 returns.
这听起来可能很愚蠢,但我需要排除我的应用程序在 Firestore 上的文档读取背后的可能性。 客户端SDK使用where查询时,所有文档是下载到客户端再过滤还是在服务端过滤返回? 还有,我们用云函数where查询是什么情况?
例如:假设合集帖子有 1000 个文档,其中 10 个符合 where 查询中提到的条件,如果我使用
,我将按阅读次数付费- 客户端 SDK 2) 云函数
When the where query is used using client SDK, are all the documents downloaded to the client and then filtered or they are filtered at the server and returned?
否,文件在服务器上被过滤。您只会获得代表查询结果的文档。
Also, what is the case when we use where query with cloud functions?
这和上面的完全一样。
Let's say collection posts have 1000 documents and 10 match the criteria mentioned in the where query, how many reads I would get charged for if I use
只有 10 个。您将始终按阅读的文档数量付费。例如,如果您的查询 returns 只有 10 个文档,则您只需按 10 个文档读取付费,仅此而已。请记住,您要搜索的文档数量并不重要,重要的是您查询的文档数量 returns.