
Answer-first summary for fast verification
Answer: Modify the row key syntax in your Cloud Bigtable table to start with the stock symbol.
**Correct Answer: A** Modifying the row key syntax in the Cloud Bigtable table to begin with the stock symbol enhances application performance by improving data locality. This ensures that data related to the same stock is stored together, making queries for stock prices more efficient. **Why the other options are incorrect:** - **B**: Switching to BigQuery is not optimal for real-time lookups like calculating average stock prices over an adjustable window, as BigQuery is designed for analytical queries. - **C**: Starting the row key with a random number per second could fragment data across nodes, increasing latency and reducing performance. - **D**: This approach adds unnecessary complexity and could introduce latency in retrieving real-time stock price data, making it less efficient for your application's needs.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You manage a database that stores stock trades and an application calculating the average stock price for a specific company within a customizable timeframe. The data is stored in Cloud Bigtable, with the trade datetime at the start of the row key. As more stocks are added and thousands of users access the application simultaneously, performance is declining. What is the best way to improve your application's performance under these conditions?
A
Modify the row key syntax in your Cloud Bigtable table to start with the stock symbol.
B
Switch the data pipeline to use BigQuery for storing stock trades, and update your application accordingly.
C
Alter the row key syntax in your Cloud Bigtable table to start with a random number per second.
D
Implement Cloud Dataflow to create a daily summary of stock trades in an Avro file on Cloud Storage. Adjust your application to read from both Cloud Storage and Cloud Bigtable for responses.
No comments yet.