Create partial index for gitlab-monitor CI metrics
What does this MR do?
Create partial index for gitlab-monitor CI metrics
This creates a partial index intended to speed up queries on
ci_builds
. Particularly, gitlab-monitor
has rather heavy queries.
Those have been changed to only look back 7 days and benefit from this
index tremendously.
Relates to https://gitlab.com/gitlab-org/gitlab-exporter/merge_requests/101.
Issues:
- https://gitlab.com/gitlab-org/gitlab-exporter/issues/58
- https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/7724
Conformity
-
Changelog entry for user-facing changes, or community contribution. Check the link for other scenarios.
Query performance
Actual queries using this index are present in gitlab-monitor
. Refer to https://gitlab.com/gitlab-org/gitlab-exporter/merge_requests/101#note_211245325 for plans.