Add count projects with monitor enabled metric
What does this MR do and why?
Adds a new metric "Count projects with Monitor enabled".
Related to #382972 (closed)
Query
SELECT COUNT("project_features"."id")
FROM "project_features"
WHERE "project_features"."monitor_access_level" != 0 AND "project_features"."id" BETWEEN 1 AND 10000
https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/15015/commands/52209
Query optimization MR
Add partial index on project_features.id (!109461 - closed)
Based on the following thread now we're trying to reduce batch size from 100k to 10k and avoid adding an index.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Vitali Tatarintev