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

Use length on fields in mysql indexes

This commit is contained in:
Paweł Chmielowski 2018-02-26 09:43:04 +01:00
parent b2095ebcfe
commit 5912c573ea
2 changed files with 6 additions and 6 deletions

View File

@ -113,9 +113,9 @@ CREATE TABLE archive (
) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE FULLTEXT INDEX i_text ON archive(txt); CREATE FULLTEXT INDEX i_text ON archive(txt);
CREATE INDEX i_archive_sh_username_timestamp USING BTREE ON archive(server_host(191), username, timestamp); CREATE INDEX i_archive_sh_username_timestamp USING BTREE ON archive(server_host(191), username(191), timestamp);
CREATE INDEX i_archive_sh_username_peer USING BTREE ON archive(server_host(191), username, peer); CREATE INDEX i_archive_sh_username_peer USING BTREE ON archive(server_host(191), username(191), peer(191));
CREATE INDEX i_archive_sh_username_bare_peer USING BTREE ON archive(server_host(191), username, bare_peer); CREATE INDEX i_archive_sh_username_bare_peer USING BTREE ON archive(server_host(191), username(191), bare_peer(191));
CREATE INDEX i_archive_sh_timestamp USING BTREE ON archive(server_host(191), timestamp); CREATE INDEX i_archive_sh_timestamp USING BTREE ON archive(server_host(191), timestamp);
CREATE TABLE archive_prefs ( CREATE TABLE archive_prefs (

View File

@ -102,9 +102,9 @@ CREATE TABLE archive (
) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE FULLTEXT INDEX i_text ON archive(txt); CREATE FULLTEXT INDEX i_text ON archive(txt);
CREATE INDEX i_username_timestamp USING BTREE ON archive(username, timestamp); CREATE INDEX i_username_timestamp USING BTREE ON archive(username(191), timestamp);
CREATE INDEX i_username_peer USING BTREE ON archive(username, peer); CREATE INDEX i_username_peer USING BTREE ON archive(username(191), peer(191));
CREATE INDEX i_username_bare_peer USING BTREE ON archive(username, bare_peer); CREATE INDEX i_username_bare_peer USING BTREE ON archive(username(191), bare_peer(191));
CREATE INDEX i_timestamp USING BTREE ON archive(timestamp); CREATE INDEX i_timestamp USING BTREE ON archive(timestamp);
CREATE TABLE archive_prefs ( CREATE TABLE archive_prefs (