简体   繁体   English

GCP 数据存储与搜索 API 性能基准?

[英]GCP Datastore vs Search API performance benchmarks?

Are there any existing benchmarks about GCP Datastore queries and Search queries performance?是否有关于 GCP Datastore 查询和搜索查询性能的任何现有基准?

I'm interested how the performance changes as the data grows.我对性能如何随着数据增长而变化很感兴趣。 For instance, if we have:例如,如果我们有:

class Project:
  members = ndb.StringProperty(repeated=True)

and we have document in Search like:我们在搜索中有文档,例如:

SearchDocument([AtomField(name=member, value='value...'), ...])

I want to run a search to get all project ids the user is member of.我想运行搜索以获取用户所属的所有项目 ID。 Something like:就像是:

ndb.query(keys_only=True).filter(Project.members == 'This Member')

in Datastore and similar query in the Search.在数据存储区和搜索中的类似查询。

How would the performance compare when there are 10, 100, ... 16 * 6 objects?当有 10, 100, ... 16 * 6 个对象时,性能比较如何?

I'm interested whether there is some rule of thumb about the latency we could expect for this simple kind of queries.我感兴趣的是,对于这种简单的查询,是否有一些关于我们可以预期的延迟的经验法则。 Of course I can go and try that, but would like to get some intuitive idea about the performance I can expect beforehand, if someone had done similar benchmarks.当然,我可以去尝试一下,但是如果有人做过类似的基准测试,我想对我可以预期的性能有一些直观的了解。 Also, I would like to avoid spending $ and time on writing/reading data I would later need to delete, so if someone could share their experience, that would be much appreciated!另外,我想避免在写入/读取我以后需要删除的数据上花费 $ 和时间,所以如果有人可以分享他们的经验,那将不胜感激!

ps I use Python, but would assume the answer would be same/similar for all languages which have support for GCP. ps 我使用 Python,但会假设所有支持 GCP 的语言的答案都是相同/相似的。

Until this moment, Api Search is only supported for Python 2 , unfortunately this version of Python is no longer supported, so you should consider that you will not be able to receive support for this service.到目前为止,Api Search 仅支持Python 2 ,遗憾的是不再支持此版本的 Python,因此您应该考虑到您将无法获得此服务的支持。

On the other hand, take a look at the code provided in this thread, it can give you an idea of how to perform a benchmark test for Datastore using python 3.另一方面,请查看此线程中提供的代码,它可以让您了解如何使用 python 3 对 Datastore 执行基准测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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