Closed TeeNak closed 4 years ago
currently the partition is based on 'type' field. Across the library I pass the field value to query only within the partition. I'm not sure how can I make the partition key configurable.
Any chance to merge my PR if I could change this?
You can have shared bandwidth across multiple containers in a database, so you can already create a database with for e.g. 400RU's and create 2 separate containers in that database that share those RU's (so cost is the same as if you had put all the documents in both those containers in the same container, but perf will likely be much better).
If you left the partition key as user configurable, you would be opening yourself up to potentially massive performance issues if the wrong field was selected to partition by.
Agree @graemechristie
@graemechristie @imranmomin OK. I may have wrong understanding for throughput per database. Agree to close this issue.
Description
This is just a proposal. Making partition key configurable will be helpful in some situations.
Purpose
I have a currently running service which uses one CosmosDB container which is not fully utilizing the 400RU minimum. Though it is natural to have two container to serve each purpose, but it is also common to have mixed type object container like you already do to save the money particularly in azure CosmosDB world. If we could change the name of partition key that will help a lot.