Skip to content

Commit

Permalink
notifier: delete manifest_index_manifest_id_package_id_dist_id_repo_i…
Browse files Browse the repository at this point in the history
…d_idx

Currently, we have two indexes (manifest_index_manifest_id_package_id_dist_id_repo_id_idx
and manifest_index_unique) that cover the same data. As manifest_index_unique is chosen
by the query planner to service affected manifest queries and keeps the unique constraint,
and manifest_index_manifest_id_package_id_dist_id_repo_id_idx takes up a large amount of
storage, it is surplus to requirements.

Signed-off-by: crozzy <joseph.crosland@gmail.com>
  • Loading branch information
crozzy authored and hdonnay committed Oct 20, 2022
1 parent 7e5d7d6 commit d9abe3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- manifest_index_unique is being used for the affected manifest
-- query so this index is currently surplus to requirements.
DROP INDEX IF EXISTS manifest_index_manifest_id_package_id_dist_id_repo_id_idx;
4 changes: 4 additions & 0 deletions datastore/postgres/migrations/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ var IndexerMigrations = []migrate.Migration{
ID: 4,
Up: runFile("indexer/04-foreign-key-cascades.sql"),
},
{
ID: 5,
Up: runFile("indexer/05-delete-manifest-index-index.sql"),
},
}

var MatcherMigrations = []migrate.Migration{
Expand Down

0 comments on commit d9abe3d

Please sign in to comment.