]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
imv-database: Improve performance by creating file_hashes index
authorAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 7 Aug 2017 14:46:27 +0000 (16:46 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 7 Aug 2017 15:43:54 +0000 (17:43 +0200)
src/libimcv/imv/tables.sql

index 749eb609a5c5db7c9af3b885febda459e1cc3af2..8bde8898f95d51afb55265214509690f5942a305 100644 (file)
@@ -48,6 +48,8 @@ CREATE TABLE file_hashes (
   hash VARCHAR(64) NOT NULL,
   mutable INTEGER DEFAULT 0
 );
+DROP INDEX IF EXISTS "file_hashes_idx";
+CREATE INDEX "file_hashes_idx" ON "file_hashes" ("file", "version", "algo");
 
 DROP TABLE IF EXISTS groups;
 CREATE TABLE groups (