Skip to main content

All Questions

1 vote
1 answer
270 views

(When) is it better to enlarge CosmosDb partitions to avoid cross-partition queries?

It's clear from documentation and other CosmosDb articles that smaller partitions have many benefits, but also that cross-partition queries come at a greater cost. So is it wise to broaden partitions ...
TheRubberDuck's user avatar
0 votes
0 answers
260 views

How to design a cosmos DB to do efficient query on non-partition key as well

I am new to Cosmos DB and facing issue in designing my DB. I have a data similar to below structure { "userId": "64_CHAR_ID", "gpId": "34_CHAR_ID" ... ...
Raj Suvariya's user avatar
  • 1,664
1 vote
0 answers
222 views

How to partition orders in Cosmos DB?

I'm working on an application where customers can order products and the manufacturer has to process these orders. I want to use Cosmos DB and I'm currently trying to decide how to model the data. I ...
Daniel Sklenitzka's user avatar
11 votes
2 answers
4k views

Indexing the partition key in Azure Cosmos DB

Suppose I've the following data in my container: { "id": "1DBF704E-1623-4844-DC86-EFA729A5C048", "firstName": "Wylie", "lastName": "...
galbru's user avatar
  • 452
4 votes
1 answer
2k views

Cosmos DB: Query documents by time interval using partition key

How do I choose a partition key in such a way that I can efficiently query all my documents for a given time period? Background: I'm building an analytics tool for a chat application using Azure ...
OrangeTree's user avatar
1 vote
2 answers
1k views

Write-heavy partition key strategy for Azure Cosmos DB

We’re using CosmosDB in production to store HTTP request/response audit data. The structure of this data generally looks as follows: { "id": "5ff4c51d3a7a47c0b5697520ae024769", "Timestamp": "...
Barrie McGuire's user avatar
1 vote
1 answer
216 views

Difference between partition key indicated in query expression and feedoptions in cosmos db

I'm calling "queryDocuments(String collectionLink, String query, FeedOptions options)" api in cosmos db for doing some sql query with partition key. I wonder where I should indicate the partition key, ...
Anonymous_coder's user avatar
0 votes
1 answer
212 views

Does postal code makes sense as partition key in CosmosDB for a global solution?

I have a CosmosDB collection for storing some places information that is using the postal code as partition key. The issue that I'm facing is that for some countries I'm not getting a postal code from ...
rmejias's user avatar
  • 21
0 votes
0 answers
95 views

Choosing Cosmos Partition Keys

I'm creating a proof of concept for a micro service that will query a Cosmos DB. This DB will contain significant amounts of data culled from thousands of SQL databases. Each SQL database is a site ...
Steve Pettifer's user avatar
2 votes
2 answers
4k views

CosmosDb Partition Key For Nested Java Object/Json (Spring Boot)

I'm trying to partition a collection based on a nested Java object and the corresponding Json. I know it might seem unreasonable to do this, but I am working on a project far into development, and the ...
Christian Meyer's user avatar
1 vote
2 answers
719 views

Inconsistent querying on a partitioned CosmosDB collection

I have a partitioned cosmos DB collection which is defined as unlimited with a throughput of 1000. It has the following document structure: "Id": "b42129d2-5467-450c-9f7e-744f78dfe1e7", // Primary ...
HuntressMain's user avatar
0 votes
1 answer
4k views

CosmosDB - Querying Across All Partitions

I'm creating a logging system to monitor our (200 ish) main application installations, and Cosmos db seems like a good fit due to the amount of data we'll collect, and to allow a varying schema for ...
Ted's user avatar
  • 2,575
0 votes
1 answer
52 views

Read Model Partition Key Strategy

I have a collection of documents that looks like the following: There is one document per VIN/SiteID and our access pattern is showing all documents at a specific site. I see two potential partition ...
Marco's user avatar
  • 2,473
16 votes
5 answers
12k views

Azure Cosmos DB partition key - is primary key acceptable?

Our Azure Cosmos DB collection has gotten large enough to require a partition key. In doing some reading about this, I get the impression that the best partition key is one that provides for even ...
Scotty H's user avatar
  • 6,714
0 votes
2 answers
815 views

Encode PartitionKey into Document Id?

I have set the partition key of one of my Cosmos DBs to /partition. For example: We have a Chat document that contains a list of Subscribers, then we have ChatMessages that contain a text, a ...
Chief Wiggum's user avatar
  • 2,944

15 30 50 per page