3 ms·
If you're partitioning by month how would the month end up in 2 partitions? I mean how would march and up in april or something!???
by philliphaydon 9y ago
If you're partitioning by month how would the month end up in 2 partitions? I mean how would march and up in april or something!???
- e12e 9y agoThink: TransactionId, ItemId, BuyerID, Count, date (1, 1, 1, 2, 1/1/2018; 1, 2, 1, 2, 1/2/2018) Where TransactionId should be globally unique? [ed: see https://news.ycombinator.com/item?id=16196096 https://news.ycombinator.com/item?id=16196096 for a much better/comprehensive example of the same idea]
- deleted 9y ago[deleted]
- gshulegaard 9y agoSee my response above :)
- e12e 9y agoI agree that you would normally end up with a compound unique key, but it might have some benefits to know that your transaction I'd was globally unique. Not jus per month/weekday - but also on geographic region, stores (eg: avoid need to rewrite/legacy support on store merges/splits, ditto for regions etc).