查询按照结果集的大小进行缩放,而不是数据集的大小 [英] Queries scale with the size of your result set, not the size of your data set
问题描述
这是关于最新的 Firebase Cloud Firestore的问题
它也允许表达式查询。查询的大小是
的结果集,而不是数据集的大小,所以您将获得相同的
性能,从100或100,000,000的集合中获取1个结果。
这个说法对我来说不是很清楚。你能稍微解释一下这个用例吗?
解决方案这可能会写得有点混乱。从经典意义上讲,它不是一个用例,而是关于Firestore性能的一个声明。
基本上说,如果你从100.000.000中的100个或1个项目中请求1个项目并不重要,它将同样快。这里1是你的结果集,100 / 100.000.000是你的数据集。所以要求100.000.000中的1个项目要比请求100个项目中的50个要快。
我希望这个更清楚一点!
This is a question about the latest Firebase Cloud Firestore.In this doc it says like this:
It also allows for expressive queries. Queries scale with the size of your result set, not the size of your data set, so you'll get the same performance fetching 1 result from a set of 100, or 100,000,000.
This statement is not clear for me. Can you explain little bit more about this use case?
This may be written a bit confusing. It is not a use-case in the classic sense its just a statement about the performance of Firestore.
It basically says that it does not matter if you request 1 item out of a 100 or 1 item out of 100.000.000, it will be equally fast. Here 1 is your result set and 100/100.000.000 is your data set. So requesting 1 item out of 100.000.000 will be faster than requesting 50 items out of 100.
I hope this makes it a bit clearer!
这篇关于查询按照结果集的大小进行缩放,而不是数据集的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!