O'Reilly logo

Mastering DynamoDB by Tanmay Deshpande

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Global secondary index best practices

Global secondary indexes allow us to create alternate hash and range keys on non-primary key attributes. Querying is made quite an easy task with secondary indexes. There are various best practices one should follow while using global secondary indexes. We are going to discuss all such best practices in this section.

As we keep saying, it is very important for us to choose the correct hash and range keys attributes, which would be distributing the load evenly across the partitions. We need to choose the attributes having a variety of values as hash and range keys. Consider an example of a student table where we have columns such as roll number, name, grade, and marks. Here, the grade column would have values ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required