Select only the data we need to speed up requests

This commit is contained in:
Jan Oberhauser 2019-07-31 14:16:55 +02:00
parent 9022ca0923
commit f1f2deb1d4

View file

@ -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",