0
votes

I have a collection which will store at around 1 millions records monthly in cosmos db collection, which comes to 4-5 GB of data quarterly. I want to create a partition key based on "EventType", but in this case also, each "EventType" reach up 10 GB limit within in a year.

So the next option for us to create a partition key based on "PayerNumber" field. But we may have 10,000 unique payer numbers.

Is it a good idea to choose this field("PayerNumber") to create a partition key? How many logical partitions are supported by Cosmos DB? Is there any limit to it?

Following is the sample json:

{
"PayerName": "XYZ",
"PayerNumber": "XYZ00000667",
"EventType": "CARD_BLOCK",
"EventTypeDescription": "CARD_BLOCK",
"ModifiedByUUID": "4f371d98-0e31-442b-9ff9-9dcf4a629640",
"ModifiedByUserName": "Postman",
"SubscriptionIsPayerAccountBased": false,
"Data": [
    {
        "AccountName": "XYZ",
        "AccountNumber": "XYZ00000667",
        "DriverName": "DSDSDS",
        "ExpiryDate": "2019-03-31",
        "PAN": "*******912068",
        "Status": "Active",
        "VRN": "FDFDFD"
    }
]

}

1

1 Answers

0
votes

There is no limit to logical partitions in Cosmos DB. You should read choosing the right partition key article. You might want to create an artificial partition key, based on how your data will be spread.