We have a graph in Azure Cosmos DB (Gremlin API) with approx 3K vertices and 16K edges. I would like to drop all edges but keep the vertices.
When I run gremlin query like q.E().drop()
I get the exception
ExceptionType : RequestRateTooLargeException ExceptionMessage : Message: {"Errors":["Request rate is large"]}
Current RU/s limit is 3000 RU/s
I understand the mechanism behind throwing such error. The "wait and retry" is not an option here - the limit is exceeded by a single query not by many queries, so the next time I run it after some wait period, I will also get the same exception.
The question is what options do I have to drop all the edges with as little queries as possible?
I was trying to run q.E().limit(20).drop()
and it works and reports 237.62999999999994 RUs
When I run q.E().limit(2000).drop()
I get the exception.
The 'g.E().limit(1).drop()' results shows varying RU cost in Azure Data Explorer:
Executed: g.E().limit(1).drop() (61.72 RUs)
Executed: g.E().limit(1).drop() (53.14 RUs)
Executed: g.E().limit(1).drop() (61.72 RUs)
Executed: g.E().limit(1).drop() (56 RUs)
But constant Request Charge : 546.38
What would be the optimal way to get rid of the edges (in terms of performance and/or in terms of the cost)