]> git.mxchange.org Git - friendica.git/commitdiff
Further performance improvements
authorMichael <icarus@dabo.de>
Wed, 25 Jul 2012 20:50:06 +0000 (22:50 +0200)
committerMichael <icarus@dabo.de>
Wed, 25 Jul 2012 20:50:06 +0000 (22:50 +0200)
database.sql
update.php

index 13722d3c0c5132b6ada8adf5aae322a5e297abc8..684491685ea8eaedd4258f9b8e81fcad1218e5b3 100644 (file)
@@ -571,6 +571,7 @@ CREATE TABLE IF NOT EXISTS `item` (
   KEY `author-name` (`author-name`),
   KEY `uid_commented` (`uid`, `commented`),
   KEY `uid_created` (`uid`, `created`),
+  KEY `uid_unseen` (`uid`, `unseen`),
   FULLTEXT KEY `title` (`title`),
   FULLTEXT KEY `body` (`body`),
   FULLTEXT KEY `allow_cid` (`allow_cid`),
index 879d7017d4b69cef4b124b73777282c03aa98d99..2d80ee369dc03b4325228d94e6caebda9bdda52e 100644 (file)
@@ -1338,7 +1338,13 @@ function update_1152() {
 }
 
 function update_1153() {
-       $r = q("CREATE INDEX `uid_commented` ON `item` (`uid`, `commented`);  CREATE INDEX `uid_created` ON `item` (`uid`, `created`)");
+       $r = q("CREATE INDEX `uid_commented` ON `item` (`uid`, `commented`)");
+       if(! $r)
+               return UPDATE_FAILED;
+       $r = q("CREATE INDEX `uid_created` ON `item` (`uid`, `created`)");
+       if(! $r)
+               return UPDATE_FAILED;
+       $r = q("CREATE INDEX `uid_unseen` ON `item` (`uid`, `unseen`)");
        if(! $r)
                return UPDATE_FAILED;
        return UPDATE_SUCCESS;