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/mysql.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/mysql.new.sql | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/mysql.new.sql b/sql/mysql.new.sql index a5d03c8c7..dc514becf 100644 --- a/sql/mysql.new.sql +++ b/sql/mysql.new.sql @@ -301,6 +301,7 @@ CREATE TABLE muc_room ( ) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE UNIQUE INDEX i_muc_room_name_host USING BTREE ON muc_room(name(75), host(75)); +CREATE INDEX i_muc_room_host_created_at ON muc_room(host(75), created_at); CREATE TABLE muc_registered ( jid text NOT NULL, |