Re:The Set data structure saved me from a world of pain
by root993 on Tuesday October 20, 2020 @06:39AM
(#24835840)
For a very large database where the count would be filtered based on status of the conversations and running this query for every single support channel would be expensive would it not?
Re:The Set data structure saved me from a world of pain
by afandian on Tuesday October 20, 2020 @11:16AM
(#24838299)
Probably less expensive than Redis.
Given that the SQL approach is the standard one, I'd personally expect load testing to demonstrate that it didn't scale before doing something unusual.
This solution requires an extra instance of Redis in addition to a SQL db (which I assume is already in the mix), and has the potential for consistency drift.
And SQL is a very close cousin of set theory.