From 5fc654b75820fe0c2a9b1c2a25d909b9c2acef30 Mon Sep 17 00:00:00 2001 From: Ske Date: Sat, 21 Dec 2019 21:42:34 +0100 Subject: [PATCH] Add index to message table to speed up count querying --- PluralKit.Core/db_schema.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PluralKit.Core/db_schema.sql b/PluralKit.Core/db_schema.sql index d401a6d4..e3e8d016 100644 --- a/PluralKit.Core/db_schema.sql +++ b/PluralKit.Core/db_schema.sql @@ -74,6 +74,8 @@ ON switch_members USING btree ( switch ASC NULLS LAST ) INCLUDE (member); +create index if not exists idx_message_member on messages (member); + create table if not exists webhooks ( channel bigint primary key,