3 ms·
I think we killed it :)
by dc_gregory 9y ago
I think we killed it :)
- bryanrasmussen 9y agoyou've got to double tap to make sure, rules of surviving rss is undead land.
- NicoJuicy 9y agoBack alive atm ( disabled RSS sync :p ) If anyone knows how to performantly sort on non deterministic computed columns ( eg. the ranking algorithm for votes of posts + comments) in MS SQL server -> https://dba.stackexchange.com/questions/203331/slow-calculated-sort-in-ms-sql-server https://dba.stackexchange.com/questions/203331/slow-calculat... i'd be very happy :p, it's killing my "trending topic" performance... Edit: added non deterministic
- pbalau 9y agoYou don't do the calculation on the fly, you do it at data mutation time (if the column should be the same for every client) or in a separate "thread" (eg, a script). Basically, you pre calculate the column and simply add it to your table, indexed.
- NicoJuicy 9y agoIt's non deterministic because it has a time variation ( newer posts get ranked higher). Even then?
- erpellan 9y agoDon't modify the scores of old posts, start newer ones with a higher score. Check out how reddit does it: https://medium.com/hacking-and-gonzo/how-reddit-ranking-algorithms-work-ef111e33d0d9 https://medium.com/hacking-and-gonzo/how-reddit-ranking-algo... The concept is that the time-based part of the score is immutable, fixed at post creation time. That way you only have to recalculate when a score-modifying event occurs, not every time the page is refreshed.
- NicoJuicy 9y agoGood advice, thx!