mirror of
https://github.com/moparisthebest/minetest
synced 2024-12-22 23:58:48 -05:00
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:
parent
f9eb31f317
commit
380e1504eb
@ -242,8 +242,7 @@ bool RollbackManager::createTables()
|
|||||||
" FOREIGN KEY (`oldNode`) REFERENCES `node`(`id`),\n"
|
" FOREIGN KEY (`oldNode`) REFERENCES `node`(`id`),\n"
|
||||||
" FOREIGN KEY (`newNode`) REFERENCES `node`(`id`)\n"
|
" FOREIGN KEY (`newNode`) REFERENCES `node`(`id`)\n"
|
||||||
");\n"
|
");\n"
|
||||||
"CREATE INDEX IF NOT EXISTS `actionActor` ON `action`(`actor`);\n"
|
"CREATE INDEX IF NOT EXISTS `actionIndex` ON `action`(`x`,`y`,`z`,`timestamp`,`actor`);\n",
|
||||||
"CREATE INDEX IF NOT EXISTS `actionTimestamp` ON `action`(`timestamp`);\n",
|
|
||||||
NULL, NULL, NULL));
|
NULL, NULL, NULL));
|
||||||
verbosestream << "SQL Rollback: SQLite3 database structure was created" << std::endl;
|
verbosestream << "SQL Rollback: SQLite3 database structure was created" << std::endl;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user