notifier: delete manifest_index_manifest_id_package_id_dist_id_repo_id_idx#677
Merged
Merged
Conversation
Contributor
Author
EXPLAIN SELECT
manifest.hash
FROM
manifest_index
JOIN manifest ON
manifest_index.manifest_id = manifest.id
WHERE
package_id = 61
AND (
CASE
WHEN 3::INT8 IS NULL THEN dist_id IS NULL
ELSE dist_id = 3
END
)
AND (
CASE
WHEN null::INT8 IS NULL THEN repo_id IS NULL
ELSE repo_id = 2
END
); |
3127b8f to
e095551
Compare
…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>
e095551 to
d9abe3d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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