mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
Fixing GetPosts active sort index. Fixes #2683
This commit is contained in:
parent
41010328c1
commit
fc878a7a22
6
migrations/2023-02-01-012747_fix_active_index/down.sql
Normal file
6
migrations/2023-02-01-012747_fix_active_index/down.sql
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
drop index
|
||||||
|
idx_post_aggregates_featured_local_active,
|
||||||
|
idx_post_aggregates_featured_community_active;
|
||||||
|
|
||||||
|
create index idx_post_aggregates_featured_local_active on post_aggregates (featured_local desc, hot_rank(score, newest_comment_time) desc, newest_comment_time desc);
|
||||||
|
create index idx_post_aggregates_featured_community_active on post_aggregates (featured_community desc, hot_rank(score, newest_comment_time) desc, newest_comment_time desc);
|
7
migrations/2023-02-01-012747_fix_active_index/up.sql
Normal file
7
migrations/2023-02-01-012747_fix_active_index/up.sql
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
-- This should use the newest_comment_time_necro, not the newest_comment_time for the hot_rank
|
||||||
|
drop index
|
||||||
|
idx_post_aggregates_featured_local_active,
|
||||||
|
idx_post_aggregates_featured_community_active;
|
||||||
|
|
||||||
|
create index idx_post_aggregates_featured_local_active on post_aggregates (featured_local desc, hot_rank(score, newest_comment_time_necro) desc, newest_comment_time desc);
|
||||||
|
create index idx_post_aggregates_featured_community_active on post_aggregates (featured_community desc, hot_rank(score, newest_comment_time_necro) desc, newest_comment_time desc);
|
Loading…
Reference in New Issue
Block a user