Index notifications to allow faster lookup by kind, entity id
This commit is contained in:
@@ -341,4 +341,7 @@ CREATE TABLE "notifications" (
|
||||
"response" BOOLEAN
|
||||
);
|
||||
|
||||
CREATE INDEX "index_notifications_on_recipient_id_is_read" ON "notifications" ("recipient_id", "is_read");
|
||||
CREATE INDEX
|
||||
"index_notifications_on_recipient_id_is_read_kind_entity_id"
|
||||
ON "notifications"
|
||||
("recipient_id", "is_read", "kind", "entity_id");
|
||||
|
||||
@@ -16,4 +16,7 @@ CREATE TABLE notifications (
|
||||
"response" BOOLEAN
|
||||
);
|
||||
|
||||
CREATE INDEX "index_notifications_on_recipient_id" ON "notifications" ("recipient_id");
|
||||
CREATE INDEX
|
||||
"index_notifications_on_recipient_id_is_read_kind_entity_id"
|
||||
ON "notifications"
|
||||
("recipient_id", "is_read", "kind", "entity_id");
|
||||
|
||||
Reference in New Issue
Block a user