#3963 Add indices to standard_buildroot.
Closed: Fixed by mikem. Opened by tkopecek.

As this is often queried table, we could add more indices there by default. Potential candidates:

"standard_buildroot_pkey" PRIMARY KEY, btree (buildroot_id)
"standard_buildroot_create_event" btree (create_event)
"standard_buildroot_host_id" btree (host_id)
"standard_buildroot_repo_id" btree (repo_id)
"standard_buildroot_retire_event" btree (retire_event)
"standard_buildroot_task_id" btree (task_id)

Metadata Update from @tkopecek:
- Custom field Size adjusted to None
- Issue set to the milestone: 1.35

Doing 'create index concurrently standard_buildroot_host_id on standard_buildroot(host_id);' here really really helped our load on the fedoraproject koji.

Are we still aiming for this in 1.35?

It's a bit unclear which of these would make the most sense, though. Kojira does call repo_references quite a bit and that could benefit from the repo_id index.

otoh, query_buildroots/listBuildroots could benefit from nearly all of them at least for joins, and is called several places (notably quite regularly by the builders)

buildroot_id is already a primary key though. We don't need to add that one

Well, I've filed #4134 which adds them all. We could always drop some later if we see they aren't getting used

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.36 (was: 1.35)

Metadata Update from @mikem:
- Issue tagged with: testing-basic

Metadata Update from @mfilip:
- Issue tagged with: testing-done

Commit d5d3ea76 fixes this issue

Commit 5b760315 fixes this issue

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/koji/issues/3963

Please continue any further discussion there.

Metadata
Related Pull Requests