Why would a system use a denormalized pre-computed feed table indexed by viewer_id and created_at?

Test your Systems Design Concepts knowledge with our comprehensive quiz. Utilize flashcards and multiple choice questions to enhance your study session. Prepare thoroughly with detailed explanations for each answer and ace your examination!

Multiple Choice

Why would a system use a denormalized pre-computed feed table indexed by viewer_id and created_at?

Explanation:
A denormalized pre-computed feed table designed around viewer_id and created_at is all about fast reads. By pre-joining the data you commonly need for a viewer’s feed (post content, author info, engagement metrics, etc.) into a single table, you avoid expensive multi-table joins at query time. Indexing by viewer_id narrows the results to just the feed items for a specific user, and using created_at allows quick ordering to present the most recent items first and to paginate efficiently. This approach sacrifices some write complexity and potential freshness for the benefit of very fast, scalable reads, which is exactly what a responsive feed requires. The other options describe goals that don’t align with this pattern: storing raw normalized data, guaranteeing absolute transactional consistency across writes, or simplifying foreign key constraints are not the aims of a pre-computed, denormalized feed.

A denormalized pre-computed feed table designed around viewer_id and created_at is all about fast reads. By pre-joining the data you commonly need for a viewer’s feed (post content, author info, engagement metrics, etc.) into a single table, you avoid expensive multi-table joins at query time. Indexing by viewer_id narrows the results to just the feed items for a specific user, and using created_at allows quick ordering to present the most recent items first and to paginate efficiently. This approach sacrifices some write complexity and potential freshness for the benefit of very fast, scalable reads, which is exactly what a responsive feed requires. The other options describe goals that don’t align with this pattern: storing raw normalized data, guaranteeing absolute transactional consistency across writes, or simplifying foreign key constraints are not the aims of a pre-computed, denormalized feed.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy