Added moderation_queue key
authorAlexander Ebert <ebert@woltlab.com>
Sat, 10 Dec 2016 13:06:43 +0000 (14:06 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 10 Dec 2016 13:06:43 +0000 (14:06 +0100)
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

index cdba1a31a9da847a0d7c6f3758d5d9bb6643edd3..14e6da404869c19ef2d6de9a4462fd423bb53ae5 100644 (file)
@@ -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;