25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Add missing indexes to sql sr_group tables

This commit is contained in:
Paweł Chmielowski 2021-05-18 18:29:32 +02:00
parent 16af8a4739
commit 95fa43aa96
6 changed files with 15 additions and 0 deletions

View File

@ -73,6 +73,8 @@ CREATE TABLE sr_group (
PRIMARY KEY (server_host, name)
);
CREATE UNIQUE INDEX i_sr_group_sh_name ON sr_group (server_host, name);
CREATE TABLE sr_user (
jid text NOT NULL,
server_host text NOT NULL,
@ -81,6 +83,7 @@ CREATE TABLE sr_user (
PRIMARY KEY (server_host, jid, grp)
);
CREATE UNIQUE INDEX i_sr_user_sh_jid_grp ON sr_user (server_host, jid, grp);
CREATE INDEX i_sr_user_sh_jid ON sr_user (server_host, jid);
CREATE INDEX i_sr_user_sh_grp ON sr_user (server_host, grp);

View File

@ -65,6 +65,8 @@ CREATE TABLE sr_group (
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE UNIQUE INDEX i_sr_group_name ON sr_group (name);
CREATE TABLE sr_user (
jid text NOT NULL,
grp text NOT NULL,

View File

@ -76,6 +76,8 @@ CREATE TABLE sr_group (
PRIMARY KEY (server_host(191), name)
) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE UNIQUE INDEX i_sr_group_sh_name ON sr_group(server_host(191), name);
CREATE TABLE sr_user (
jid varchar(191) NOT NULL,
server_host varchar(191) NOT NULL,
@ -84,6 +86,7 @@ CREATE TABLE sr_user (
PRIMARY KEY (server_host(191), jid, grp)
) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE UNIQUE INDEX i_sr_user_sh_jid_group ON sr_group(server_host(191), jid, grp);
CREATE INDEX i_sr_user_sh_jid ON sr_user(server_host(191), jid);
CREATE INDEX i_sr_user_sh_grp ON sr_user(server_host(191), grp);

View File

@ -68,6 +68,8 @@ CREATE TABLE sr_group (
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE UNIQUE INDEX i_sr_group_name ON sr_group(name);
CREATE TABLE sr_user (
jid varchar(191) NOT NULL,
grp varchar(191) NOT NULL,

View File

@ -218,6 +218,8 @@ CREATE TABLE sr_group (
PRIMARY KEY (server_host, name)
);
CREATE UNIQUE INDEX i_sr_group_sh_name ON sr_group USING btree (server_host, name);
CREATE TABLE sr_user (
jid text NOT NULL,
server_host text NOT NULL,
@ -226,6 +228,7 @@ CREATE TABLE sr_user (
PRIMARY KEY (server_host, jid, grp)
);
CREATE UNIQUE INDEX i_sr_user_sh_jid_grp ON sr_user USING btree (server_host, jid, grp);
CREATE INDEX i_sr_user_sh_jid ON sr_user USING btree (server_host, jid);
CREATE INDEX i_sr_user_sh_grp ON sr_user USING btree (server_host, grp);

View File

@ -69,6 +69,8 @@ CREATE TABLE sr_group (
created_at TIMESTAMP NOT NULL DEFAULT now()
);
CREATE UNIQUE INDEX i_sr_group_name ON sr_group USING btree (name);
CREATE TABLE sr_user (
jid text NOT NULL,
grp text NOT NULL,