
Answer-first summary for fast verification
Answer: Partition by timestamp, as it is likely that queries will often filter by time ranges.
Partitioning by timestamp is often the most effective strategy for datasets where time-based queries are common. This allows for efficient pruning of partitions based on time ranges, which is a typical query pattern in datasets of financial transactions.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Consider a dataset of financial transactions that includes columns like transaction_id, customer_id, amount, 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 transaction_id, as it is likely that queries will often filter by specific transactions.
B
Partition by customer_id, as it is likely that queries will often filter by individual customers.
C
Partition by amount, as it is likely that queries will often filter by transaction amounts.
D
Partition by timestamp, as it is likely that queries will often filter by time ranges.
No comments yet.