forked from MirrorHub/mautrix-whatsapp
Add index on message timestamps
This commit is contained in:
parent
5c5633548f
commit
b97b3755dc
2 changed files with 5 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
-- v0 -> v56 (compatible with v45+): Latest revision
|
||||
-- v0 -> v57 (compatible with v45+): Latest revision
|
||||
|
||||
CREATE TABLE "user" (
|
||||
mxid TEXT PRIMARY KEY,
|
||||
|
@ -82,6 +82,8 @@ CREATE TABLE message (
|
|||
FOREIGN KEY (chat_jid, chat_receiver) REFERENCES portal(jid, receiver) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE INDEX message_timestamp_idx ON message (chat_jid, chat_receiver, timestamp);
|
||||
|
||||
CREATE TABLE poll_option_id (
|
||||
msg_mxid TEXT,
|
||||
opt_id TEXT,
|
||||
|
|
2
database/upgrades/57-message-timestamp-index.sql
Normal file
2
database/upgrades/57-message-timestamp-index.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
-- v57 (compatible with v45+): Add index for message timestamp to make read receipt handling faster
|
||||
CREATE INDEX message_timestamp_idx ON message (chat_jid, chat_receiver, timestamp);
|
Loading…
Reference in a new issue