Does it make sense to separate records in a document DB (e.g. DynamoDB) for better query performance?
0
votes
0
answers
43
views
I've recently started working with DynamoDB, and most of my experience is in traditional data warehousing (e.g. sql server). One common pattern which I saw when working with SQL server was that we would sometimes separate "active" data from "historical" data, so we would have one table with last months or years data (the time interval which most of our queries were based on), and then another table with the rest of history, for occasional retrieval. We would do this improve query performance.
Now my question is does this design pattern make any sense when working with i.e. DynamoDB with a well partitioned key. So if I've partitioned my DynamoDB by customer id + time, and I'm occasionally interested in getting each customers consumption (whenever they check their dashboard in the app) during the past month or so, does it make sense to have separate tables for past month, and rest of history? As I've understood with partitioning it doesn't even consider the, or need to search for data from the partitions that contain data outside of my search range (since time was part of the partition key), but this is just my assumption. Query speed is of utmost importance, and the data I'm working with spans multiple years.
Asked by Anton
(101 rep)
Apr 13, 2021, 10:41 AM
Last activity: Apr 13, 2021, 11:17 AM
Last activity: Apr 13, 2021, 11:17 AM