diff options
author | cheapie <cheapiephp@gmail.com> | 2015-10-23 23:52:45 -0500 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2015-10-24 08:45:38 +0200 |
commit | 380e1504eb2445fd43c03c87d23b8e41e85a7871 (patch) | |
tree | c18650409ff0f980b34b68b3bff69e03fb3a90ae /src | |
parent | f9eb31f317ed2de61f6a57fb6d99604aa9d13b94 (diff) | |
download | minetest-380e1504eb2445fd43c03c87d23b8e41e85a7871.tar.gz minetest-380e1504eb2445fd43c03c87d23b8e41e85a7871.tar.bz2 minetest-380e1504eb2445fd43c03c87d23b8e41e85a7871.zip |
Improve rollback database indexing
Index more columns in the action table of the rollback DB to improve the performance of /rollback_check
Diffstat (limited to 'src')
-rw-r--r-- | src/rollback.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rollback.cpp b/src/rollback.cpp index 3d264b880..2367c3a21 100644 --- a/src/rollback.cpp +++ b/src/rollback.cpp @@ -242,8 +242,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; |