Which table configuration will result in the lowest impact on provisioned throughput for this query?

An application stores payroll information nightly in DynamoDB for a large number of
employees across hundreds of offices. Item attributes consist of individual name, office
identifier, and cumulative daily hours. Managers run reports for ranges of names working in
their office. One query is. “Return all Items in this office for names starting with A through
E”. Which table configuration will result in the lowest impact on provisioned throughput for
this query?

An application stores payroll information nightly in DynamoDB for a large number of
employees across hundreds of offices. Item attributes consist of individual name, office
identifier, and cumulative daily hours. Managers run reports for ranges of names working in
their office. One query is. “Return all Items in this office for names starting with A through
E”. Which table configuration will result in the lowest impact on provisioned throughput for
this query?

A.
Configure the table to have a range index on the name attribute, and a hash index on the
office identifier

B.
Configure a hash index on the name attribute and no range index

C.
Configure the table to have a hash index on the name attribute, and a range index on the
office identifier

D.
Configure a hash index on the office Identifier attribute and no range index



Leave a Reply 6

Your email address will not be published. Required fields are marked *


mr_tienvu

mr_tienvu

I agree with the answer. A

Simon Liang

Simon Liang

A.

Think of it this way: the hash/partition key is the part of the query that is going to be the same for all the items that are returned. In this case that would be the office since the query is looking for employees in “this (single) office.” The range/sort key is going to be different for each of the items returned by the query. The sense of “range” or “sort” is implicit in the fact that we’re getting all the employees whose last names are A through E (a range of letters).

BDA

BDA

A , see Simon Liang’s explanation.