优化Cosmos DB Gremlin查询 [英] Optimizing Cosmos DB Gremlin Queries

查看:149
本文介绍了优化Cosmos DB Gremlin查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我正在使用azure Cosmos DB Gremlin API,已经将大约300万个节点推到了图上.

I am working with azure Cosmos DB Gremlin API and I have pushed around 3 million nodes on to my graph.

推送所有数据后,cosmos DB上的数据大小为2.51 GB,索引大小为1.02 GB.

After pushing all the data the data size on cosmos DB is 2.51 GB and Index size is 1.02 GB.

每当我从Azure Gremlin API在该图上执行任何Gremlin查询时,即使执行诸如特定标签节点的数量"之类的小查询也要花费大量时间.

Whenever I execute any Gremlin query on that Graph from azure Gremlin API it takes a lot of time to execute even small queries like "count of a particular label nodes".

很多时候它显示警告为"查询结果太大,仅显示部分结果 ".因此,我无法执行大多数查询.

Many times it shows a warning as "The query results are too large and only partial results are displayed ". Hence I am unable to execute most of the queries.

请向我建议一种或两种方法,以便我的查询能够实时向我返回期望的结果,因为我的最终目标是推入至少3000万个节点并查询那么多的节点以检索100万个节点的结果.

Please suggest me a method or two so that my queries return me desired results within real time because my end goal is to push atleast 30 million nodes and query that much of nodes to retrieve results of million nodes.

推荐答案

嗨Arpit,

Hi Arpit,

请查看此堆栈溢出线程讨论: 

Please take a look at this Stack Overflow thread discussion: Cosmos Db Graph - Performance and throughput of Gremlin.Net vs Microsoft.Graph

.NET SDK内置有一个限制机制,用于处理对结果进行批量处理的429错误(RU限制).使用Gremlin.NET SDK,查询可以一次全部执行.因此,您需要增加RU阈值以适应最大可能 如果您不打算使用限制机制,则返回查询结果集.

The .NET SDK has a throttle mechanism built in to handle the 429 Error (RU Throttling) where the results are batched. With the Gremlin.NET SDK the query executes all at once. So, you need to increase your RU threshold to accommodate the largest possible query result-set you are returning, if you are not going to use a throttling mechanism.

让我们知道您是否还有其他问题.

Let us know if you have additional questions.

此致

迈克(Mike)


这篇关于优化Cosmos DB Gremlin查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆