aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2017-09-27 15:30:23 +0200
committerHolger Weiss <holger@zedat.fu-berlin.de>2017-09-27 15:30:23 +0200
commit1c6aa5e84e1e011076e9c69fed091531cd4c2484 (patch)
tree4281718366e1a5ff93e738c4da78537e69893e45
parentharden ejabberdctl (#1977) (diff)
mysql.sql: Use multi-column index on username/ID
-rw-r--r--sql/mysql.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/mysql.sql b/sql/mysql.sql
index 3fddea510..e2586853b 100644
--- a/sql/mysql.sql
+++ b/sql/mysql.sql
@@ -102,7 +102,7 @@ CREATE TABLE archive (
) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE FULLTEXT INDEX i_text ON archive(txt);
-CREATE INDEX i_username USING BTREE ON archive(username);
+CREATE INDEX i_username_timestamp USING BTREE ON archive(username,timestamp);
CREATE INDEX i_timestamp USING BTREE ON archive(timestamp);
CREATE INDEX i_peer USING BTREE ON archive(peer);
CREATE INDEX i_bare_peer USING BTREE ON archive(bare_peer);