diff options
author | Paweł Chmielowski <pawel@process-one.net> | 2022-02-18 14:01:22 +0100 |
---|---|---|
committer | Paweł Chmielowski <pawel@process-one.net> | 2022-02-18 14:02:04 +0100 |
commit | f86055378d6337c0e0b1555067f76e62f9265c8c (patch) | |
tree | d9edd10df8c9b5ed3a59a694383532cf65dd3c57 /sql/pg.new.sql | |
parent | Check producing and starting releases (diff) |
Optimize room_unused_* commands
Previously to check if hibernated room was old enough we had to fetch info
about all rooms from database. Now we repurpose created_at field in sql
to store that info, that allow us to have more efficient query just for it.
Diffstat (limited to '')
-rw-r--r-- | sql/pg.new.sql | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/pg.new.sql b/sql/pg.new.sql index c7d22c66a..b69e6ddfa 100644 --- a/sql/pg.new.sql +++ b/sql/pg.new.sql @@ -450,6 +450,7 @@ CREATE TABLE muc_room ( ); CREATE UNIQUE INDEX i_muc_room_name_host ON muc_room USING btree (name, host); +CREATE INDEX i_muc_room_host_created_at ON muc_room USING btree (host, created_at); CREATE TABLE muc_registered ( jid text NOT NULL, |