Timeouts for graphql query fetching the count of jobs

Problem

In issue #389347 (comment 1278463194), we focused on fixing the user experience when the graphql query for jobs has a database timeout (when loading counts).

We took the approach of removing the count of jobs from the UI when it is unable to load.

There is still the issue that count times out which will cause it not to load and affect our error budget.

Solution

As recommended by the query planner, we should rework the indexes (blocked by partitioning the ci_builds table):

https://console.postgres.ai/gitlab/gitlab-production-ci/sessions/15386/commands/53448

Edited by Allison Browne