]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
create an index on user.created so sitemap generation is faster
authorEvan Prodromou <evan@status.net>
Mon, 5 Jul 2010 18:12:14 +0000 (14:12 -0400)
committerEvan Prodromou <evan@status.net>
Mon, 5 Jul 2010 18:12:14 +0000 (14:12 -0400)
plugins/Sitemap/SitemapPlugin.php

index d4d295237d842cf4425e34363c88660dd12dba3a..b6d3b1ad332a236e7df731244e93aeb8cb375c97 100644 (file)
@@ -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;
     }