Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Method to keep track of large number of sets with high cardinality
1 point by sskates on Nov 6, 2013 | hide | past | favorite
We're building an analytics service. One of our needs is to maintain ~100MM sets each with anywhere between one member to 1MM members, with each member represented as a long. We need to be able to very quickly:

-Add a member to a set, and know whether it was added

-Update a counter indicating the size of the set

We have a realtime processing loop that ingests new data and needs to be able to update some number of the sets as well as its counter.

At the moment, we have this implemented in PostgreSQL, distributed application side by set name. There's one table with two columns: the set name in the first and the value in the second, as well as an index on set name, value. Is there a better method than this? AFAIK it's not a problem with a standard solution.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: