Google Cloud Professional Data Engineer — Question 117

You operate a database that stores stock trades and an application that retrieves average stock price for a given company over an adjustable window of time. The data is stored in Cloud Bigtable where the datetime of the stock trade is the beginning of the row key. Your application has thousands of concurrent users, and you notice that performance is starting to degrade as more stocks are added. What should you do to improve the performance of your application?

Answer options

Correct answer: A

Explanation

Changing the row key syntax to start with the stock symbol (Option A) helps distribute the writes more evenly across the table, reducing hotspots and improving performance. Option B may still create hotspots due to time-based clustering. Option C suggests a change to BigQuery, which is not a direct solution for improving the existing Cloud Bigtable performance. Option D, while helpful for summarizing data, does not directly address the performance issue for concurrent users accessing stock trades.