Is using json as sort key/partition key value good practice in DynamoDB?

Viewed 398

Trying to define a schema for a DynamoDB table. More than two values decide a row.

A potential solution to put these key values is to have the sort key contain more than one value. As it's specified here.

Inspired by this approach, I'm thinking instead of using simple delimiter to concatenate values together, using JSON or any other string representation of objects(e.g.: String translated by Jackson) as the value of the sort key should be able to achieve similar goal and easy to convert.

However, my concern is by doing so - adding the length of the sort key - will it decrease the performance of DynamoDB? Is it a fine to use complicated string as the sort key?

0 Answers
Related