From 6123473ddc43b116ed8d6dec42501d8af5fffdfe Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 10 Dec 2016 14:06:43 +0100 Subject: [PATCH] Added moderation_queue key Joining the moderation queue to search for active reports matching objects became a real bottleneck, slowing down some queries significantly. --- wcfsetup/setup/db/install.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wcfsetup/setup/db/install.sql b/wcfsetup/setup/db/install.sql index cdba1a31a9..14e6da4048 100644 --- a/wcfsetup/setup/db/install.sql +++ b/wcfsetup/setup/db/install.sql @@ -681,7 +681,9 @@ CREATE TABLE wcf1_moderation_queue ( lastChangeTime INT(10) NOT NULL DEFAULT 0, -- additional data, e.g. message if reporting content - additionalData TEXT + additionalData TEXT, + + KEY objectTypeAndID (objectTypeID, objectID) ); DROP TABLE IF EXISTS wcf1_moderation_queue_to_user; -- 2.20.1