From 1c6aa5e84e1e011076e9c69fed091531cd4c2484 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Wed, 27 Sep 2017 15:30:23 +0200 Subject: mysql.sql: Use multi-column index on username/ID --- sql/mysql.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql') 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); -- cgit v1.2.3