Bird
0
0

You notice your Bigtable time-series data query is slow. Which of the following is a likely cause and fix?

medium📝 Debug Q14 of 15
GCP - Cloud Firestore and Bigtable
You notice your Bigtable time-series data query is slow. Which of the following is a likely cause and fix?
ACause: Using multiple clusters. Fix: Use a single cluster only.
BCause: Row keys are timestamp first causing hotspotting. Fix: Reverse the key to deviceID#timestamp.
CCause: Too many column families. Fix: Add more column families.
DCause: Data stored in JSON format. Fix: Convert data to XML.
Step-by-Step Solution
Solution:
  1. Step 1: Identify hotspotting from row key design

    If timestamp is first in the key, writes concentrate on a small range causing slow queries.
  2. Step 2: Fix by changing row key order

    Placing deviceID first distributes writes and reads better, improving performance.
  3. Final Answer:

    Cause: Row keys are timestamp first causing hotspotting. Fix: Reverse the key to deviceID#timestamp. -> Option B
  4. Quick Check:

    Hotspotting fix = reorder row key [OK]
Quick Trick: Avoid timestamp-first keys to prevent hotspots [OK]
Common Mistakes:
  • Thinking multiple clusters slow queries
  • Adding column families improves speed
  • Confusing data format impact on speed

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes