Bird
0
0

You want to optimize a DynamoDB table that frequently uses Scan operations with filters on non-key attributes. What is the best architectural change to improve query performance?

hard📝 Architecture Q9 of 15
AWS - DynamoDB
You want to optimize a DynamoDB table that frequently uses Scan operations with filters on non-key attributes. What is the best architectural change to improve query performance?
ASwitch to using Scan with pagination
BCreate a Global Secondary Index (GSI) on the filtered attributes and use Query
CUse Scan with more FilterExpressions
DIncrease the table's provisioned read capacity
Step-by-Step Solution
Solution:
  1. Step 1: Identify problem with Scan on non-key attributes

    Scan with filters on non-key attributes is inefficient and slow.
  2. Step 2: Use GSI for efficient queries

    Creating a GSI on those attributes allows Query operations, improving performance.
  3. Final Answer:

    Create a Global Secondary Index (GSI) on the filtered attributes and use Query -> Option B
  4. Quick Check:

    GSI enables efficient queries on non-key attributes [OK]
Quick Trick: Use GSI to query non-key attributes efficiently [OK]
Common Mistakes:
  • Relying on Scan with filters only
  • Increasing capacity without indexing
  • Using Scan pagination as a fix

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes