This website uses cookies to ensure you get the best experience.
Learn more.
An orders table is keyed by order_id. A new access pattern needs recent orders for one customer and should return status and total directly from the index. Which design choices meet the requirement? Select 2 answers.
Published
- Use customer_id as the GSI partition key and an ordered order timestamp, with a tie-breaker if needed, as its sort key.
- Use one constant customer partition key and filter out every other customer after the query.
- Project status and total into the GSI using an appropriate projection and account for its eventual consistency.
- Request strongly consistent reads from the GSI to guarantee immediate visibility after every write.
- Leave status and total unprojected and assume the GSI query always returns all base-table attributes.
Comments — 0
Sign in to comment