I am new to CosmosDB
and exploring on Partition Key
. I understand that partitionKey
helps faster retrieval. In my case suppose I have Customer Data which has custId
, offerCode
, offerId
and some other properties. I am planning to keep partitionKey
on offerId
my question is, while fetching data do I need to fetch data by using offerId
for better performance or I can fetch the data by other property from the collection. Does it impact on performance? Below is my schema or items -
{
"custId":"abc12345",
"offers":[
{
"offerId":"offer123",
"offerCode":"offerCode1"
},
{
"offerId":"offer123",
"offerCode":"offerCode2"
}
]
}