With draft builds, we adjusted the rpminfo uniqueness constraint with a partial index
1.33.0
CONSTRAINT rpminfo_unique_nvra UNIQUE (name,version,release,arch,external_repo_id)
1.34.0
CREATE UNIQUE INDEX rpminfo_unique_nvra_not_draft ON rpminfo(name,version,release,arch,external_repo_id) WHERE draft IS NOT TRUE;
We were tacitly relying on the previous index to speed up searches for nvra (as get_rpm does all the time). Postgress will not use the new index unless the query also includes draft is not true.
draft is not true
This is currently causing a ton of slowdowns in Fedora
Probably the easiest thing is to add a non-unique index for this
Metadata Update from @mikem: - Custom field Size adjusted to None
A 'CREATE INDEX concurrently rpminfo_nvra_not_draft ON rpminfo(name,version,release,arch,external_repo_id)' helped a lot here in fedora land.
Metadata Update from @tkopecek: - Issue set to the milestone: 1.35
PR #4026
Metadata Update from @tkopecek: - Issue tagged with: no_qe
Commit d7d4e4f1 fixes this issue
Commit d0c1b4d3 relates to this ticket
This issue has been migrated to Fedora Forge: https://forge.fedoraproject.org/koji/koji/issues/4022
Please continue any further discussion there.