You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lemmy/migrations/2023-07-14-215339_aggregate.../up.sql

14 lines
385 B
SQL

-- Your SQL goes here
CREATE INDEX idx_community_aggregates_nonzero_hotrank ON community_aggregates (published)
WHERE
hot_rank != 0;
CREATE INDEX idx_comment_aggregates_nonzero_hotrank ON comment_aggregates (published)
WHERE
hot_rank != 0;
CREATE INDEX idx_post_aggregates_nonzero_hotrank ON post_aggregates (published DESC)
WHERE
hot_rank != 0 OR hot_rank_active != 0;