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

From Ittichai Chammavanijakul's Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
https://docs.microsoft.com/en-us/azure/cosmos-db/graph-introduction
 
https://docs.microsoft.com/en-us/azure/cosmos-db/graph-introduction
  
{{ quote | The text you want to quote }}
+
{{note|
 +
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.
 +
}}

Latest revision as of 17:58, 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.