mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 09:49:18 +02:00
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.
This commit is contained in:
parent
f20e9e9b66
commit
f86055378d
11 changed files with 99 additions and 42 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue