Skip to content

Create partial index for gitlab-monitor CI metrics

Andreas Brandl requested to merge ab-add-index-for-ci-builds-metrics into master

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:

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.

Edited by Andreas Brandl

Merge request reports