Database Reference
In-Depth Information
Using the global secondary index for quicker
retrieval
In the previous table, if some of the attributes are not frequently accessed (for example,
Publisher , PubDate , and Edition ), then even though these will not be part of our
query, they will consume more provisioned throughput and will result in slower retrieval of
data. There are two solutions available to solve this problem.
The simpler approach is to remove these rarely used attributes from the table. This will not
work well in many cases because even though these attributes are rarely used, they might
contain some precious information (such as Edition ) that might be required in future.
So, we need to go for the second approach: using the secondary index.
The second solution is to create an index with the same key (both hash and range) as that of
the table and project only frequently used attributes into this index, without disturbing the
table items and attributes. Since DynamoDB allows us to specify different provisional
throughput capacity for the index, we can decide the data (read and write) speed for this in-
dex. After doing this, for quicker retrieval, we need to direct the queries directly to this in-
dex, instead of using the table for querying. This is the usage of the global secondary index
for quicker retrieval.
Search WWH ::




Custom Search