From c61e26ae627981f6d08e2597a5c2c197be710670 Mon Sep 17 00:00:00 2001 From: ingalls Date: Mon, 4 Dec 2023 14:07:04 -0700 Subject: [PATCH] Significant perf improvements according to EXPLAIN --- api/lib/types/run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/lib/types/run.js b/api/lib/types/run.js index b08d991e..967139e4 100644 --- a/api/lib/types/run.js +++ b/api/lib/types/run.js @@ -113,7 +113,7 @@ export default class Run extends Generic { runs.github, runs.closed, ARRAY_AGG(job.status) AS status, - COUNT(job.*) AS jobs + ARRAY_LENGTH(ARRAY_AGG(job.status), 0) AS jobs FROM runs LEFT JOIN job