summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-06-03 02:42:17 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2016-06-03 02:42:17 +0100
commit7351ed72e1b2d6c586c1f9d5eb6d262a05876f01 (patch)
treefe6254c4a6390c8edc8b7309ba70859e0832fb69
parentUse entity where filter's entity ids directly (diff)
downloadgentoobrowse-api-7351ed72e1b2d6c586c1f9d5eb6d262a05876f01.tar.bz2
gentoobrowse-api-7351ed72e1b2d6c586c1f9d5eb6d262a05876f01.tar.xz
gentoobrowse-api-7351ed72e1b2d6c586c1f9d5eb6d262a05876f01.zip
Use covering unique indexes for ebuild use and arch merge
-rw-r--r--gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp4
1 files 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";