diff options
author | Evan Prodromou <evan@status.net> | 2010-07-05 14:12:14 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-07-05 14:12:14 -0400 |
commit | 7746611f20554c92ad0213de196e880e41c3cc4e (patch) | |
tree | 33798d85d291a4e035a1f9a33a80c20aa0f8cab1 /plugins/Sitemap/SitemapPlugin.php | |
parent | c5e89527d9636275d58ef438c5e12a5aad283115 (diff) |
create an index on user.created so sitemap generation is faster
Diffstat (limited to 'plugins/Sitemap/SitemapPlugin.php')
-rw-r--r-- | plugins/Sitemap/SitemapPlugin.php | 6 |
1 files changed, 6 insertions, 0 deletions
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; } |