Difference between revisions of "Azure Cosmos DB Graph API with Python"

From Ittichai Chammavanijakul's Wiki
Jump to navigation Jump to search
Line 6: Line 6:
  
 
<blockquote>
 
<blockquote>
Line 1
+
Depending on the queries, it is possible that the District->Store relationship is used uniquely for filtering the Store vertices. For example, if queries are in the format - “obtain all the stores that belong to a specific district”. If this is the case, then it is worth to consider collapsing the District entity from a vertex of its own to a property of the Store vertex.
Line 2
+
 
Line 3
+
This approach has the benefit of reducing the cost of retrieving each Store vertex from obtaining three graph objects at a time (District, District->Store, Store) to a single Store vertex. This can provide performance improvements, as well as a reduced cost per query.
Line 4
 
 
</blockquote>
 
</blockquote>

Revision as of 15:40, 9 September 2018

https://www.taygan.co/blog/2018/01/23/azure-cosmos-db-graph-api-with-python

https://docs.microsoft.com/en-us/azure/cosmos-db/create-graph-python

https://docs.microsoft.com/en-us/azure/cosmos-db/graph-introduction

Depending on the queries, it is possible that the District->Store relationship is used uniquely for filtering the Store vertices. For example, if queries are in the format - “obtain all the stores that belong to a specific district”. If this is the case, then it is worth to consider collapsing the District entity from a vertex of its own to a property of the Store vertex.

This approach has the benefit of reducing the cost of retrieving each Store vertex from obtaining three graph objects at a time (District, District->Store, Store) to a single Store vertex. This can provide performance improvements, as well as a reduced cost per query.