From f1f2deb1d413b5814c15ebfc26880501a32e0d14 Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Wed, 31 Jul 2019 14:16:55 +0200 Subject: [PATCH] :zap: Select only the data we need to speed up requests --- packages/cli/src/Server.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/cli/src/Server.ts b/packages/cli/src/Server.ts index b4b90e839c..7d43cf393e 100644 --- a/packages/cli/src/Server.ts +++ b/packages/cli/src/Server.ts @@ -724,8 +724,10 @@ class App { if (req.query.lastStartedAt) { filter.startedAt = LessThan(req.query.lastStartedAt); } + countFilter.select = ['id']; const resultsPromise = Db.collections.Execution!.find({ + select: ['id', 'workflowData'], where: filter, order: { startedAt: "DESC",