I think we killed it :)
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-calculat... i'd be very happy :p, it's killing my "trending topic" performance...
Edit: added non deterministic
Even then?
Check out how reddit does it: 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.