Cloud Bigtable stores stock trades with the row key starting with the trade timestamp. Thousands of concurrent users query average price per company; performance degrades as more stocks are added. How do you improve performance?
Choose an answer
Tap an option to check your answer.
Correct answer: Change the row key syntax in your Cloud Bigtable table to begin with the stock symbol..
Why this is the answer
The correct answer is to change the row key syntax to begin with the stock symbol. Bigtable distributes data by row key range, and queries on the leading part of the row key are most efficient. By starting the row key with the stock symbol, all trades for a specific company are stored together, allowing for faster retrieval and aggregation of average price per company. Starting the row key with a random number would scatter data for the same stock across the table, making queries for a specific stock less efficient. Using BigQuery would involve a significant architectural change and may not be necessary if Bigtable can be optimized. Writing daily summaries to Cloud Storage would add complexity and latency, as the application would need to combine data from two sources and the summaries would not provide real-time average prices.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed