mirror of
https://github.com/minetest/minetest.git
synced 2025-03-06 20:48:40 +01:00
Restore proper rollback database indexing (#15707)
This commit is contained in:
parent
41dfac96c1
commit
7c6ade0fc5
1 changed files with 6 additions and 1 deletions
|
@ -224,7 +224,12 @@ bool RollbackManager::createTables()
|
|||
" FOREIGN KEY (`oldNode`) REFERENCES `node`(`id`),\n"
|
||||
" FOREIGN KEY (`newNode`) REFERENCES `node`(`id`)\n"
|
||||
");\n"
|
||||
"CREATE INDEX IF NOT EXISTS `actionIndex` ON `action`(`x`,`y`,`z`,`timestamp`,`actor`);\n",
|
||||
// We run queries with the following filters:
|
||||
// - `timestamp` >= ? AND `actor` = ?
|
||||
// - `timestamp` >= ?
|
||||
// - `timestamp` >= ? AND <range query on X, Y, Z>
|
||||
"CREATE INDEX IF NOT EXISTS `actionIndex` ON `action`(`x`,`y`,`z`,`timestamp`,`actor`);\n"
|
||||
"CREATE INDEX IF NOT EXISTS `actionTimestampActorIndex` ON `action`(`timestamp`,`actor`);\n",
|
||||
NULL, NULL, NULL));
|
||||
verbosestream << "SQL Rollback: SQLite3 database structure was created" << std::endl;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue