Fixing GetPosts active sort index. Fixes #2683 (#2684)

* Fixing GetPosts active sort index. Fixes #2683

* Fixing other sort.
fix_person_blocks
Dessalines 1 year ago committed by GitHub
parent 93f2eb4df0
commit d0c94a4f49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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);

@ -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_necro 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_necro desc);
Loading…
Cancel
Save