From a55bd7686c3c00fdfc5a21478d284742760fc6ff Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Thu, 6 Nov 2014 19:52:40 +0100 Subject: [PATCH] Improved performance of comment searching --- src/Upgrades/Upgrade28.php | 12 ++++++++++++ src/di.php | 1 + 2 files changed, 13 insertions(+) create mode 100644 src/Upgrades/Upgrade28.php diff --git a/src/Upgrades/Upgrade28.php b/src/Upgrades/Upgrade28.php new file mode 100644 index 00000000..a2eb9bef --- /dev/null +++ b/src/Upgrades/Upgrade28.php @@ -0,0 +1,12 @@ +getPDO(); + $pdo->exec('CREATE INDEX idx_comments_postId ON comments(postId)'); + } +} diff --git a/src/di.php b/src/di.php index 1b6b3dae..bd4145cd 100644 --- a/src/di.php +++ b/src/di.php @@ -43,6 +43,7 @@ return [ $container->get(\Szurubooru\Upgrades\Upgrade25::class), $container->get(\Szurubooru\Upgrades\Upgrade26::class), $container->get(\Szurubooru\Upgrades\Upgrade27::class), + $container->get(\Szurubooru\Upgrades\Upgrade28::class), ]; }),