From 7746611f20554c92ad0213de196e880e41c3cc4e Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 5 Jul 2010 14:12:14 -0400 Subject: 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 d4d295237..b6d3b1ad3 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; } -- cgit v1.2.3-54-g00ecf