Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
DynamoDB Applied Design Patterns

You're reading from  DynamoDB Applied Design Patterns

Product type Book
Published in Sep 2014
Publisher
ISBN-13 9781783551897
Pages 202 pages
Edition 1st Edition
Languages
Author (1):
Uchit Hamendra Vyas Uchit Hamendra Vyas

Best practices with secondary indexes


There are four rules to create the secondary index so that our table will function without any hiccups. These rules are as follows:

  • Distributing the load by choosing the correct key

  • Making use of the sparse index

  • Using the global secondary index for quicker retrieval

  • Creating a read replica

Distributing the load by choosing the correct key

In the case of a multipartition table, the data as well as the table's associated indexes will be distributed across servers. This distribution of indexes across servers is determined by the value of one of the attributes of the index. Yes, you're correct: it is decided by the hash key value. Unlike the hash key value (compounded with the range key) of a table, indexes keys can be duplicated. In the case of local secondary indexes, this problem will not occur because of the fact that the table's hash key is the same as that of the index, so the index will be distributed similar to the table. Therefore, this practice must...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}