PostgreSQL index optimizations

This commit is contained in:
Patrick Marschik 2021-01-20 13:19:40 +01:00 committed by fguillot
parent 4ff52bd730
commit 1ed3816d6f

View file

@ -496,4 +496,12 @@ var migrations = []func(tx *sql.Tx) error{
`)
return err
},
func(tx *sql.Tx) (err error) {
_, err = tx.Exec(`
CREATE INDEX entries_feed_url_idx ON entries(feed_id, url);
CREATE INDEX entries_user_feed_idx ON entries(user_id, status, feed_id);
CREATE INDEX entries_user_status_changed_idx ON entries(user_id, status, changed_at);
`)
return err
},
}