VirtualBox

Changeset 56789 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
Jul 3, 2015 3:46:07 PM (10 years ago)
Author:
vboxsync
Message:

testmanager: index tuning.

Location:
trunk/src/VBox/ValidationKit/testmanager/db
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseInit.pgsql

    r56295 r56789  
    128128    PRIMARY KEY (uid, tsExpire)
    129129);
    130 CREATE INDEX UsersLoginNameIdx ON Users (tsExpire, sLoginName);
     130CREATE INDEX UsersLoginNameIdx ON Users (sLoginName, tsExpire DESC);
    131131
    132132
     
    410410    PRIMARY KEY (idTestCase, tsExpire, sArgs)
    411411);
    412 CREATE INDEX TestCaseArgsLookupIdx ON TestCaseArgs (idTestCase, tsExpire, tsEffective);
     412CREATE INDEX TestCaseArgsLookupIdx ON TestCaseArgs (idTestCase, tsExpire DESC, tsEffective ASC);
    413413
    414414
     
    515515    PRIMARY KEY (idTestGroup, tsExpire)
    516516);
    517 CREATE INDEX TestGroups_id_index ON TestGroups (idTestGroup, tsExpire, tsEffective);
     517CREATE INDEX TestGroups_id_index ON TestGroups (idTestGroup, tsExpire DESC, tsEffective ASC);
    518518
    519519
     
    834834    CHECK (fCpuNestedPaging IS NULL OR (fCpuNestedPaging <> TRUE OR fCpuHwVirt = TRUE))
    835835);
    836 CREATE UNIQUE INDEX TestBoxesUuidIdx ON TestBoxes (uuidSystem, tsExpire);
     836CREATE UNIQUE INDEX TestBoxesUuidIdx ON TestBoxes (uuidSystem, tsExpire DESC);
     837CREATE INDEX TestBoxesExpireEffectiveIdx ON TestBoxes (tsExpire DESC, tsEffective ASC);
    837838
    838839
     
    10461047    PRIMARY KEY (idBlacklisting, tsExpire)
    10471048);
     1049CREATE INDEX BuildBlacklistIdx ON BuildBlacklist (iLastRevision DESC, iFirstRevision ASC, sProduct, sBranch,
     1050                                                  tsExpire DESC, tsEffective ASC);
    10481051
    10491052--- @table BuildCategories
     
    13111314CREATE INDEX TestResultsSetIdx ON TestResults (idTestSet, idStrName, idTestResult);
    13121315CREATE INDEX TestResultsParentIdx ON TestResults (idTestResultParent);
    1313 -- The TestResultsNameIdx is for speeding up the result graph & reporting code.
    1314 CREATE INDEX TestResultsNameIdx ON TestResults (idStrName, idTestResult, tsCreated);
     1316-- The TestResultsNameIdx and TestResultsNameIdx2 are for speeding up the result graph & reporting code.
     1317CREATE INDEX TestResultsNameIdx ON TestResults (idStrName, tsCreated DESC);
     1318CREATE INDEX TestResultsNameIdx2 ON TestResults (idTestResult, idStrName);
    13151319
    13161320ALTER TABLE TestResultFailures
     
    15461550CREATE INDEX TestSetsTestCaseIdx    ON TestSets (idTestCase, idTestResult);
    15471551CREATE INDEX TestSetsTestVarIdx     ON TestSets (idTestCaseArgs, idTestResult);
    1548 --- The TestSetCreatedDone is for testbox results, graph options and such.
    1549 CREATE INDEX TestSetsCreatedDoneIdx ON TestSets (tsCreated, tsDone);
     1552--- The TestSetsDoneCreatedBuildCatIdx is for testbox results, graph options and such.
     1553CREATE INDEX TestSetsDoneCreatedBuildCatIdx ON TestSets (tsDone DESC NULLS FIRST, tsCreated ASC, idBuildCategory);
    15501554--- For graphs.
    1551 CREATE INDEX TestSetsGraphBoxIdx    ON TestSets (idTestBox, tsCreated, tsDone, idBuildCategory, idTestCase);
     1555CREATE INDEX TestSetsGraphBoxIdx    ON TestSets (idTestBox, tsCreated DESC, tsDone ASC NULLS LAST, idBuildCategory, idTestCase);
    15521556
    15531557ALTER TABLE TestResults      ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL;
     
    17561760    PRIMARY KEY (idSchedGroup, idItem)
    17571761);
    1758 
     1762CREATE INDEX SchedQueuesItemIdx          ON SchedQueues(idItem);
     1763CREATE INDEX SchedQueuesSchedGroupIdx    ON SchedQueues(idSchedGroup);
     1764
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette