ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 78 - AZ-204 discussion

Report
Export

You are developing an Azure Cosmos DB solution by using the Azure Cosmos DB SQL API. The data includes millions of documents. Each document may contain hundreds of properties.

The properties of the documents do not contain distinct values for partitioning. Azure Cosmos DB must scale individual containers in the database to meet the performance needs of the application by spreading the workload evenly across all partitions over time.

You need to select a partition key.

Which two partition keys can you use? Each correct answer presents a complete solution.

NOTE: Each correct selection is worth one point.

A.
a single property value that does not appear frequently in the documents
Answers
A.
a single property value that does not appear frequently in the documents
B.
a value containing the collection name
Answers
B.
a value containing the collection name
C.
a single property value that appears frequently in the documents
Answers
C.
a single property value that appears frequently in the documents
D.
a concatenation of multiple property values with a random suffix appended
Answers
D.
a concatenation of multiple property values with a random suffix appended
E.
a hash suffix appended to a property value
Answers
E.
a hash suffix appended to a property value
Suggested answer: D, E

Explanation:

You can form a partition key by concatenating multiple property values into a single artificial partitionKey property. These keys are referred to as synthetic keys.

Another possible strategy to distribute the workload more evenly is to append a random number at the end of the partition key value. When you distribute items in this way, you can perform parallel write operations across partitions.

Note: It's the best practice to have a partition key with many distinct values, such as hundreds or thousands. The goal is to distribute your data and workload evenly across the items associated with these partition key values. If such a property doesn't exist in your data, you can construct a synthetic partition key.

Reference:

https://docs.microsoft.com/en-us/azure/cosmos-db/synthetic-partition-keys

asked 02/10/2024
Nitharsan Balanavaneethan
45 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first