Hi
I'm trying to understand the executionProfile example, specifically the section that details the number of partitions accessed by the query:
"storeOps": [
{
"partitionsAccessed": 1,
"count": 0,
"size": 0,
"time": 0.6
}
Does the partitionsAccessed refer to physical partitions or logical partitions?
If the partition key is supplied with the query e.g.
g.V(['pkValue','mary']).out('knows').executionProfile()
Will the partitionsAccessed value always be 1?
Thanks.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@andylholloway Thank you for the detailed inquiry. I believe this relates to logical partitions. Physical partitions are created by the underlying service to support the logical partitions + collections created by the configurations of your deployment. Having a solid and accurate answer to this in the FAQ page would be helpful. This document explains Logical and Physical partitioning in greater detail: Partitioning and horizontal scaling in Azure Cosmos DB
Unlike logical partitions, physical partitions are an internal implementation of the system. You can't control their size, placement, the count, or the mapping between the logical partitions and the physical partitions. However, you can control the number of logical partitions and the distribution of data and throughput by choosing the right partition key.
I am going to assign this as a doc-enhancement to the content owner to evaluate and update as appropriate.
@andylholloway : This was an experimental feature and now have been removed.
To answer your question, if you provide partition key, the query will always look for the vertex within a single logical key.
Also, you might find this article useful.
https://medium.com/@jayanta.mondal/getting-the-best-out-of-cosmos-dbs-scale-out-graph-api-aka-partitioned-graph-containers-bf47c240e698
We will now proceed to close this thread. If there are further questions regarding this matter, please comment and we will gladly continue the discussion. Although the initial question has been addressed, the additional dialog is constructive to the topic being discussed.
@andylholloway FYI - We submitted a fix to update the doc.
Most helpful comment
@andylholloway FYI - We submitted a fix to update the doc.