PostgreSQL index optimizations
This commit is contained in:
parent
4ff52bd730
commit
1ed3816d6f
1 changed files with 8 additions and 0 deletions
|
@ -496,4 +496,12 @@ var migrations = []func(tx *sql.Tx) error{
|
||||||
`)
|
`)
|
||||||
return err
|
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
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue