Create index on syncapi_send_to_device table with user_id and device_id to improve select performance (#27)

This commit is contained in:
PiotrKozimor 2022-08-22 16:48:40 +02:00 committed by GitHub
parent 157554f94d
commit 23045e156c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,6 +41,8 @@ CREATE TABLE IF NOT EXISTS syncapi_send_to_device (
-- The event content JSON.
content TEXT NOT NULL
);
CREATE INDEX IF NOT EXISTS syncapi_send_to_device_user_id_device_id_idx ON syncapi_send_to_device(user_id, device_id);
`
const insertSendToDeviceMessageSQL = `