From 7351ed72e1b2d6c586c1f9d5eb6d262a05876f01 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 3 Jun 2016 02:42:17 +0100 Subject: Use covering unique indexes for ebuild use and arch merge --- gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp b/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp index 4b77a31..4560e95 100644 --- a/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp +++ b/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp @@ -150,7 +150,7 @@ namespace Gentoo { dbc->patchTable(&t); } { - dbc->execute("CREATE INDEX idxTmpEbuildUses ON tmpEbuildUses(ebuildId)"); + dbc->execute("CREATE UNIQUE INDEX idxTmpEbuildUses ON tmpEbuildUses(ebuildId, use)"); DB::TablePatch t; t.src = "tmpEbuildUses"; t.dest = "gentoobrowse.ebuild_uses"; @@ -160,7 +160,7 @@ namespace Gentoo { dbc->patchTable(&t); } { - dbc->execute("CREATE INDEX idxTmpEbuildArchs ON tmpEbuildArchs(ebuildId)"); + dbc->execute("CREATE UNIQUE INDEX idxTmpEbuildArchs ON tmpEbuildArchs(ebuildId, arch)"); DB::TablePatch t; t.src = "tmpEbuildArchs"; t.dest = "gentoobrowse.ebuild_archs"; -- cgit v1.2.3