A device platform needs all readings for one device between two timestamps. A proposed DynamoDB model uses the same partition key for every reading and a random sort key. Which model better fits the primary query?

Published
  1. Keep one global partition key and scan the entire table for every device query.
  2. Use a suitably distributed device identifier as the partition key and an ordered timestamp-based sort key, accounting for very high-volume devices.
  3. Use a random partition key for every reading and rely on a FilterExpression to avoid reading unrelated records.
  4. Store only the timestamp as the partition key and discard device identity.

Comments — 0