From 8a02b806c97de16319453518fa62ed81b1e9a152 Mon Sep 17 00:00:00 2001 From: KOBA789 Date: Sat, 18 Mar 2023 11:10:06 +0900 Subject: [PATCH] Use limit() instead of take() because take() produces needless DISTINCT (#72) --- packages/backend/src/server/api/endpoints/notes/timeline.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/endpoints/notes/timeline.ts b/packages/backend/src/server/api/endpoints/notes/timeline.ts index c7f42c91a..07179553b 100644 --- a/packages/backend/src/server/api/endpoints/notes/timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/timeline.ts @@ -131,7 +131,7 @@ export default class extends Endpoint { } //#endregion - const timeline = await query.take(ps.limit).getMany(); + const timeline = await query.limit(ps.limit).getMany(); process.nextTick(() => { this.activeUsersChart.read(me);