Improve rollback database indexing

Index more columns in the action table of the rollback DB to improve the performance of /rollback_check
This commit is contained in:
cheapie 2015-10-23 23:52:45 -05:00
parent 59fa117d13
commit fd70c60005
1 changed files with 1 additions and 2 deletions

View File

@ -240,8 +240,7 @@ bool RollbackManager::createTables()
" FOREIGN KEY (`oldNode`) REFERENCES `node`(`id`),\n"
" FOREIGN KEY (`newNode`) REFERENCES `node`(`id`)\n"
");\n"
"CREATE INDEX IF NOT EXISTS `actionActor` ON `action`(`actor`);\n"
"CREATE INDEX IF NOT EXISTS `actionTimestamp` ON `action`(`timestamp`);\n",
"CREATE INDEX IF NOT EXISTS `actionIndex` ON `action`(`x`,`y`,`z`,`timestamp`,`actor`);\n",
NULL, NULL, NULL));
verbosestream << "SQL Rollback: SQLite3 database structure was created" << std::endl;