go-waku/waku/persistence/postgres/migrations/sql/2_messages_index.up.sql
2023-01-05 13:25:15 -04:00

3 lines
226 B
SQL

CREATE INDEX IF NOT EXISTS i_msg_1 ON message(contentTopic ASC, pubsubTopic ASC, senderTimestamp ASC, id ASC);
CREATE INDEX IF NOT EXISTS i_msg_2 ON message(contentTopic DESC, pubsubTopic DESC, senderTimestamp DESC, id DESC);