mirror of https://github.com/LemmyNet/lemmy
Make sure comments are sorted by hot_rank, then score. (#3667)
parent
ccc122100e
commit
623d81139e
@ -0,0 +1,4 @@
|
||||
drop index idx_comment_aggregates_hot, idx_comment_aggregates_score;
|
||||
|
||||
create index idx_comment_aggregates_hot on comment_aggregates (hot_rank desc, published desc);
|
||||
create index idx_comment_aggregates_score on comment_aggregates (score desc, published desc);
|
@ -0,0 +1,10 @@
|
||||
-- Alter the comment_aggregates hot sort to sort by score after hot_rank.
|
||||
-- Reason being, is that hot_ranks go to zero after a few days,
|
||||
-- and then comments should be sorted by score, not published.
|
||||
|
||||
drop index idx_comment_aggregates_hot, idx_comment_aggregates_score;
|
||||
|
||||
create index idx_comment_aggregates_hot on comment_aggregates (hot_rank desc, score desc);
|
||||
|
||||
-- Remove published from this sort, its pointless
|
||||
create index idx_comment_aggregates_score on comment_aggregates (score desc);
|
Loading…
Reference in New Issue