Bird
0
0

Given a Bigtable with row keys designed as region#userID#timestamp, what will be the effect on data locality when scanning all users in a single region?

medium📝 query result Q4 of 15
GCP - Cloud Firestore and Bigtable
Given a Bigtable with row keys designed as region#userID#timestamp, what will be the effect on data locality when scanning all users in a single region?
ARows are scattered randomly, causing slow scans
BRows for the region are stored together, enabling efficient scans
CRows are grouped by timestamp only
DRows are grouped by userID only
Step-by-Step Solution
Solution:
  1. Step 1: Analyze row key structure

    Row keys start with region, so all rows for a region are stored contiguously.
  2. Step 2: Understand scan impact

    Scanning by region benefits from locality, making scans efficient.
  3. Final Answer:

    Rows for the region are stored together, enabling efficient scans -> Option B
  4. Quick Check:

    Prefix grouping improves scan locality = B [OK]
Quick Trick: Prefix keys group data for fast regional scans [OK]
Common Mistakes:
  • Assuming random scattering despite prefix
  • Thinking grouping is by timestamp or userID only
  • Ignoring row key order importance

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes