Add note receiver index

Only makes a difference if there is
a large amount of notes in the database.
Better be safe than sorry.
This commit is contained in:
P0nk
2023-02-27 18:16:23 +01:00
parent 12745c207d
commit d018b0f5e5

View File

@@ -8,4 +8,5 @@ CREATE TABLE note(
deleted smallint NOT NULL,
PRIMARY KEY (id)
);
GRANT SELECT, INSERT, UPDATE ON note TO ${server-username};
CREATE INDEX idx_note_received ON note(receiver);
GRANT SELECT, INSERT, UPDATE ON note TO ${server-username};