From 7746611f20554c92ad0213de196e880e41c3cc4e Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 5 Jul 2010 14:12:14 -0400 Subject: [PATCH] create an index on user.created so sitemap generation is faster --- plugins/Sitemap/SitemapPlugin.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/Sitemap/SitemapPlugin.php b/plugins/Sitemap/SitemapPlugin.php index d4d295237d..b6d3b1ad33 100644 --- a/plugins/Sitemap/SitemapPlugin.php +++ b/plugins/Sitemap/SitemapPlugin.php @@ -202,6 +202,12 @@ class SitemapPlugin extends Plugin null, false), new ColumnDef('modified', 'timestamp'))); + $userCreated = $schema->getColumnDef('user', 'created'); + + if (empty($userCreated) || $userCreated->key != 'MUL') { + $schema->createIndex('user', 'created'); + } + return true; } -- 2.39.5