From 424ef6c5bfa52eb754bacf0478defb6db593bf09 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sat, 10 May 2025 22:30:05 +0200 Subject: [PATCH] Rolled in index from #4706 This closes #4706 --- .../Scripts/Local/16. Remove index from remotevolume.sql | 1 + .../Database/Database schema/16. Add RemoteVolume index.sql | 1 + Duplicati/Library/Main/Database/Database schema/Schema.sql | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Duplicati/CommandLine/DatabaseTool/Scripts/Local/16. Remove index from remotevolume.sql b/Duplicati/CommandLine/DatabaseTool/Scripts/Local/16. Remove index from remotevolume.sql index 4c7d21801..e5fa5c5ce 100644 --- a/Duplicati/CommandLine/DatabaseTool/Scripts/Local/16. Remove index from remotevolume.sql +++ b/Duplicati/CommandLine/DatabaseTool/Scripts/Local/16. Remove index from remotevolume.sql @@ -1 +1,2 @@ DROP INDEX IF EXISTS "RemotevolumeNameOnly"; +DROP INDEX IF EXISTS "FileLookupMetadataID"; \ No newline at end of file diff --git a/Duplicati/Library/Main/Database/Database schema/16. Add RemoteVolume index.sql b/Duplicati/Library/Main/Database/Database schema/16. Add RemoteVolume index.sql index cc84a6002..1c512a5d8 100644 --- a/Duplicati/Library/Main/Database/Database schema/16. Add RemoteVolume index.sql +++ b/Duplicati/Library/Main/Database/Database schema/16. Add RemoteVolume index.sql @@ -1,2 +1,3 @@ CREATE UNIQUE INDEX IF NOT EXISTS "RemotevolumeNameOnly" ON "Remotevolume" ("Name"); +CREATE INDEX IF NOT EXISTS "FileLookupMetadataID" ON "FileLookup" ("MetadataID"); UPDATE "Version" SET "Version" = 16; \ No newline at end of file diff --git a/Duplicati/Library/Main/Database/Database schema/Schema.sql b/Duplicati/Library/Main/Database/Database schema/Schema.sql index 99038885a..c93179b10 100644 --- a/Duplicati/Library/Main/Database/Database schema/Schema.sql +++ b/Duplicati/Library/Main/Database/Database schema/Schema.sql @@ -114,7 +114,7 @@ CREATE TABLE "FileLookup" ( /* Fast path based lookup, single properties are auto-indexed */ CREATE UNIQUE INDEX "FileLookupPath" ON "FileLookup" ("PrefixID", "Path", "BlocksetID", "MetadataID"); CREATE INDEX "nn_FileLookup_BlockMeta" ON FileLookup ("BlocksetID", "MetadataID"); - +CREATE INDEX "FileLookupMetadataID" ON "FileLookup" ("MetadataID"); /*