Book Image

Mastering DynamoDB

By : Tanmay Deshpande
Book Image

Mastering DynamoDB

By: Tanmay Deshpande

Overview of this book

Table of Contents (18 chapters)
Mastering DynamoDB
Credits
Foreword
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
8
Useful Libraries and Tools
Index

Table level best practices


We have already seen what a table means and how it used. There are various techniques with which we can maximize the table read/write efficiency.

Choosing a primary key

We have seen the primary key representations of DynamoDB, that is, the hash key and composite hash and range key. The hash key value decides how the items would get distributed across multiple nodes and the level parallelism. It's quite possible that some of the items in a table would be used heavily compared to others. In that case, one particular partition would be used frequently, and the rest of the partitions would range from unused to less-used, which is a bad thing considering the performance and throughput of the system. Now let's discuss some best practices in choosing the right hash key and composite hash and range key.

It is recommended that you should design your tables such that hash key of the table would be having the variety of data. It does not mean that your application must access...