How to reduce RUs consumed by a cosmos gremlin query

Viewed 64

I have a simple query to fetch vertex count in cosmos gremlin database.

g.V('person1').out('know').hasLabel('person').count()

The output of this query is say 1000. The number of RUs consumed by this query is ~466. Just wanted to know if there is any way to optimize this query or the way vertex can be stored is graph.

1 Answers

Adding PartitionKey to the query would help here,

g.V([partitionkey],[vertex id]).out('know').hasLabel('person').count()
Related