]> Untitled Git - lemmy.git/blob - migrations/2023-07-14-215339_aggregates_nonzero_indexes/up.sql
Rewrite some federation actions to remove Perform/SendActivity (ref #3670) (#3758)
[lemmy.git] / migrations / 2023-07-14-215339_aggregates_nonzero_indexes / up.sql
1 -- Your SQL goes here
2 CREATE INDEX idx_community_aggregates_nonzero_hotrank ON community_aggregates (published) WHERE hot_rank != 0;
3 CREATE INDEX idx_comment_aggregates_nonzero_hotrank ON comment_aggregates (published) WHERE hot_rank != 0;
4 CREATE INDEX idx_post_aggregates_nonzero_hotrank ON post_aggregates (published DESC) WHERE hot_rank != 0 OR hot_rank_active != 0;