News for hackers. Stuff that matters.
Re:Snappy Dashboards with Redis by samstokes on Monday October 15, 2012 @09:15PM (#4657985)
Certainly you can implement this same pattern without Redis. Triggers in Postgres would be a reasonable way to do it. I didn't say you can't do this in Postgres, I said you can't do it with COUNT().

It does indeed sound like they're storing every click: that's precisely why using aggregate functions would be expensive.

Re:Snappy Dashboards with Redis by guywithabike on Monday October 15, 2012 @10:02PM (#4658124)
You absolutely can do it without COUNT. Just increment a counter value, the same way they're doing it in Redis.
Re:Snappy Dashboards with Redis by pestaa on Tuesday October 16, 2012 @03:26AM (#4658759)
Why was this downvoted? Adding 1 to any number field is just as an atomic operation as incrementation is in Redis.
Re:Snappy Dashboards with Redis by samstokes on Wednesday October 17, 2012 @01:28PM (#4665535)
Presumably it was downvoted (not by me) because it's refuting a claim I didn't make:

samstokes: I said you can't do it with COUNT()

guywithabike: You absolutely can do it without COUNT

Then we agree.