From: Evan Prodromou Date: Mon, 5 Jul 2010 18:12:14 +0000 (-0400) Subject: create an index on user.created so sitemap generation is faster X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7746611f20554c92ad0213de196e880e41c3cc4e;p=quix0rs-gnu-social.git create an index on user.created so sitemap generation is faster --- 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; }