AWS Certified Database – Specialty — Question 268
A coffee machine manufacturer is equipping all of its coffee machines with IoT sensors. The IoT core application is writing measurements for each record to Amazon Timestream. The records have multiple dimensions and measures. The measures include multiple measure names and values.
An analysis application is running queries against the Timestream database and is focusing on data from the current week. A database specialist needs to optimize the query costs of the analysis application.
Which solution will meet these requirements?
Answer options
- A. Ensure that queries contain whole records over the relevant time range.
- B. Use time range, measure name, and dimensions in the WHERE clause of the query.
- C. Avoid canceling any query after the query starts running.
- D. Implement exponential backoff in the application.
Correct answer: B
Explanation
Amazon Timestream query pricing is determined by the volume of data scanned during execution. Including the time range, measure name, and dimensions in the WHERE clause allows Timestream to prune irrelevant data and scan only the necessary records, directly lowering costs. Other methods, like implementing exponential backoff or avoiding query cancellations, do not reduce the scanned data volume for executed queries.