Adding a few indexes.

This commit is contained in:
Dessalines 2024-12-02 18:35:18 -05:00
parent 82a14fc5fa
commit 1f284076ce
2 changed files with 6 additions and 1 deletions

View file

@ -660,7 +660,6 @@ diesel::table! {
enabled -> Bool,
published -> Timestamptz,
updated -> Nullable<Timestamptz>,
use_pkce -> Bool,
}
}

View file

@ -22,6 +22,12 @@ CREATE INDEX idx_report_combined_published ON report_combined (published DESC, i
CREATE INDEX idx_report_combined_published_asc ON report_combined (reverse_timestamp_sort (published) DESC, id DESC);
CREATE INDEX idx_report_combined_post_report ON report_combined (post_report_id);
CREATE INDEX idx_report_combined_comment_report ON report_combined (comment_report_id);
CREATE INDEX idx_report_combined_private_message_report ON report_combined (private_message_report_id);
-- Updating the history
INSERT INTO report_combined (published, post_report_id)
SELECT