
Answer-first summary for fast verification
Answer: Partition by customer_id, as it is likely that queries will often filter by individual customers.
Partitioning by customer_id allows for efficient querying of data from specific customers. This is often the most effective strategy for datasets where customer-specific queries are common.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Consider a dataset of customer feedback from an e-commerce platform, which includes columns like feedback_id, customer_id, rating, and timestamp. Describe how you would choose the appropriate partitioning strategy for this dataset to optimize query performance, considering the typical query patterns and the size of the dataset.
A
Partition by feedback_id, as it is likely that queries will often filter by specific feedback entries.
B
Partition by customer_id, as it is likely that queries will often filter by individual customers.
C
Partition by rating, as it is likely that queries will often filter by feedback ratings.
D
Partition by timestamp, as it is likely that queries will often filter by time ranges.
No comments yet.