we are discussing and identifying issues over synthetic partition key in cosmos db, Lets assume from the MS example that I have the synthetic partition key is a mix of deviceId-date what happens to the RU consumption and performance when one of the value is not there for example few queries may run without the deviceid field value and few run with date.
{
"deviceId": "ab开发者_JAVA技巧c-123",
"date": 2018,
"partitionKey": "abc-123-2018"
}
If you don't pass the entire value you will have a fan out (cross partition query).
There is a solution for this with hierarchical partition keys. However, this is a hierarchy, if you have the top and third layer and miss the second, it will still span all partitions under the top layer. You will get nothing if you pass the lowest child in the hierarchy.
This is in preview now. Can learn more here
精彩评论