From b65bdcb8f3712ebeceb936a0ee205163debd6893 Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Sun, 24 Apr 2022 22:18:51 +0100 Subject: [PATCH] perf: add indexes to notifications db --- server/src/external/mongo/indexes.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/external/mongo/indexes.ts b/server/src/external/mongo/indexes.ts index ad1b12b22..ccf13fc3b 100644 --- a/server/src/external/mongo/indexes.ts +++ b/server/src/external/mongo/indexes.ts @@ -119,6 +119,7 @@ const staticIndexes: Partial> = { "arc-saved-profiles": [index({ userID: 1, forImportType: 1 }, UNIQUE)], "score-blacklist": [index({ scoreID: 1 }, UNIQUE)], migrations: [index({ migrationID: 1 }, UNIQUE)], + notifications: [index({ notifID: 1 }, UNIQUE), index({ sentTo: 1, sentAt: 1 })], }; const indexes: Partial> = staticIndexes;