Ravi Sir's Cards › AWS
GetItem or Scan to resolve a short code?
This interview card answers: GetItem or Scan to resolve a short code? Always GetItem by partition key shortCode. Scan would read the whole table. Shortener traffic is a classic single-key lookup pattern. PK shortCode String; GetItem Key={shortCode: code} in under 10 ms typically.
Read card text
What this card says
What it is
Always GetItem by partition key shortCode. Scan would read the whole table.
Why it matters
Shortener traffic is a classic single-key lookup pattern.
How / example
PK shortCode String; GetItem Key={shortCode: code} in under 10 ms typically.