Skip to content

Mapping table

Florian Benkö edited this page Apr 15, 2020 · 1 revision

We will replace as many mappings table as possible -> they overuse the key features and are hard and slow to handle when it comes to rollbacks. It's very nice to use sorted sets. So for e.g. we replace mapping accountID:list(atomicID) -> which are actual nearly 100 different 'tables' for every accountID by a single sorted set. We call it 'account:atomic' and the values are the atomicIDs and the score is the accountID. This allows you to specify a range of accounts (1800-1830) which even makes sense because you often combine small accounts together. Because its a set of atomicIDs we are able to do actions like compare two sets and return the intersection or a join.

Clone this wiki locally