tezvyn:

Add a second access pattern to a key-value store

Source: interviewadvanced

WHAT IT TESTS: secondary indexing in NoSQL. OUTLINE: add a global secondary index on EmailAddress, weighing extra storage, write amplification, and eventual consistency. RED FLAG: a full scan with a filter, or assuming indexes are free.

WHAT IT TESTS: designing new access patterns in a partition-key world without scanning. ANSWER OUTLINE: add a global secondary index whose partition key is EmailAddress, so lookups become targeted queries, not scans. The GSI is a separate, automatically maintained, eventually consistent projection. Discuss costs: extra storage, added write capacity on every base write, and projecting only needed attributes. RED FLAG: a Scan with a filter, which still reads the whole table, or treating indexes as free and instantly consistent.

Read the original → interview

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

Add a second access pattern to a key-value store · Tezvyn