Create index on syncapi_send_to_device table with user_id and device_id to improve select performance

This commit is contained in:
Piotr Kozimor 2022-08-22 13:38:02 +02:00
parent ed79e8626a
commit 18898c5479

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 = `