Adds database metrics to track usage of Ml Experiment Tracking. This change is wrapped by :ml_experiment_tracking feature flag
https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52653
SELECT
COUNT("ml_candidates"."id")
FROM
"ml_candidates"
WHERE
"ml_candidates"."id" >= 1
AND "ml_candidates"."id" < 163
https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52654
SELECT
MAX("ml_candidates"."id")
FROM
"ml_candidates"
https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52655
SELECT
MIN("ml_candidates"."id")
FROM
"ml_candidates"
https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52656
SELECT
COUNT("ml_experiments"."id")
FROM
"ml_experiments"
WHERE
"ml_experiments"."id" >= 1
AND "ml_experiments"."id" < 17
https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52657
SELECT
MAX("ml_experiments"."id")
FROM
"ml_experiments"
https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52658
SELECT
MIN("ml_experiments"."id")
FROM
"ml_experiments"
https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52659
SELECT
COUNT(DISTINCT "ml_experiments"."project_id")
FROM
"ml_candidates"
INNER JOIN "ml_experiments" ON "ml_experiments"."id" = "ml_candidates"."experiment_id"
WHERE
"ml_experiments"."project_id" >= 20
AND "ml_experiments"."project_id" < 23
https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52660
SELECT
MAX("ml_experiments"."project_id")
FROM
"ml_candidates"
INNER JOIN "ml_experiments" ON "ml_experiments"."id" = "ml_candidates"."experiment_id"
https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52661
SELECT
MIN("ml_experiments"."project_id")
FROM
"ml_candidates"
INNER JOIN "ml_experiments" ON "ml_experiments"."id" = "ml_candidates"."experiment_id"
https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52662
SELECT
COUNT(DISTINCT "ml_candidates"."user_id")
FROM
"ml_candidates"
WHERE
"ml_candidates"."user_id" >= 1
AND "ml_candidates"."user_id" < 49
https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52663
SELECT MAX("ml_candidates"."user_id") FROM "ml_candidates”
https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52664
SELECT MIN("ml_candidates"."user_id") FROM "ml_candidates"
https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52665
SELECT
COUNT(DISTINCT "ml_experiments"."project_id")
FROM
"ml_experiments"
WHERE
"ml_experiments"."project_id" >= 20
AND "ml_experiments"."project_id" < 23
https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52666
SELECT MAX("ml_experiments"."project_id") FROM "ml_experiments"
https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/15157/commands/52667
SELECT MIN("ml_experiments"."project_id") FROM "ml_experiments"
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #372063 (closed)