VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r15-index-sorting.pgsql@ 78352

Last change on this file since 78352 was 76553, checked in by vboxsync, 6 years ago

scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1-- $Id: tmdb-r15-index-sorting.pgsql 76553 2019-01-01 01:45:53Z vboxsync $
2--- @file
3-- VBox Test Manager Database - Index tuning effort.
4--
5
6--
7-- Copyright (C) 2015-2019 Oracle Corporation
8--
9-- This file is part of VirtualBox Open Source Edition (OSE), as
10-- available from http://www.virtualbox.org. This file is free software;
11-- you can redistribute it and/or modify it under the terms of the GNU
12-- General Public License (GPL) as published by the Free Software
13-- Foundation, in version 2 as it comes in the "COPYING" file of the
14-- VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15-- hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16--
17-- The contents of this file may alternatively be used under the terms
18-- of the Common Development and Distribution License Version 1.0
19-- (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20-- VirtualBox OSE distribution, in which case the provisions of the
21-- CDDL are applicable instead of those of the GPL.
22--
23-- You may elect to license modified versions of this file under the
24-- terms and conditions of either the GPL or the CDDL or both.
25--
26
27
28--
29-- Reordered, modified and new indexes.
30--
31\d UsersLoginNameIdx;
32DROP INDEX UsersLoginNameIdx;
33CREATE INDEX UsersLoginNameIdx ON Users (sLoginName, tsExpire DESC);
34\d UsersLoginNameIdx;
35ANALYZE VERBOSE Users;
36
37
38\d TestCaseArgsLookupIdx;
39DROP INDEX TestCaseArgsLookupIdx;
40CREATE INDEX TestCaseArgsLookupIdx ON TestCaseArgs (idTestCase, tsExpire DESC, tsEffective ASC);
41\d TestCaseArgsLookupIdx;
42ANALYZE VERBOSE TestCaseArgs;
43
44
45\d TestGroups_id_index;
46DROP INDEX TestGroups_id_index;
47CREATE INDEX TestGroups_id_index ON TestGroups (idTestGroup, tsExpire DESC, tsEffective ASC);
48\d TestGroups_id_index;
49ANALYZE VERBOSE TestGroups;
50
51
52\d TestBoxesUuidIdx;
53DROP INDEX TestBoxesUuidIdx;
54CREATE UNIQUE INDEX TestBoxesUuidIdx ON TestBoxes (uuidSystem, tsExpire DESC);
55\d TestBoxesUuidIdx;
56DROP INDEX IF EXISTS TestBoxesExpireEffectiveIdx;
57CREATE INDEX TestBoxesExpireEffectiveIdx ON TestBoxes (tsExpire DESC, tsEffective ASC);
58\d TestBoxesExpireEffectiveIdx;
59ANALYZE VERBOSE TestBoxes;
60
61
62DROP INDEX IF EXISTS BuildBlacklistIdx;
63CREATE INDEX BuildBlacklistIdx ON BuildBlacklist (iLastRevision DESC, iFirstRevision ASC, sProduct, sBranch,
64 tsExpire DESC, tsEffective ASC);
65\d BuildBlacklist;
66ANALYZE VERBOSE BuildBlacklist;
67
68
69\d TestResultsNameIdx;
70DROP INDEX TestResultsNameIdx;
71CREATE INDEX TestResultsNameIdx ON TestResults (idStrName, tsCreated DESC);
72\d TestResultsNameIdx;
73DROP INDEX IF EXISTS TestResultsNameIdx2;
74CREATE INDEX TestResultsNameIdx2 ON TestResults (idTestResult, idStrName);
75\d TestResultsNameIdx2;
76ANALYZE VERBOSE TestResults;
77
78
79\d TestSetsCreatedDoneIdx;
80DROP INDEX TestSetsCreatedDoneIdx;
81DROP INDEX IF EXISTS TestSetsDoneCreatedBuildCatIdx;
82CREATE INDEX TestSetsDoneCreatedBuildCatIdx ON TestSets (tsDone DESC NULLS FIRST, tsCreated ASC, idBuildCategory);
83\d TestSetsDoneCreatedBuildCatIdx;
84\d TestSetsGraphBoxIdx;
85DROP INDEX TestSetsGraphBoxIdx;
86CREATE INDEX TestSetsGraphBoxIdx ON TestSets (idTestBox, tsCreated DESC, tsDone ASC NULLS LAST, idBuildCategory, idTestCase);
87\d TestSetsGraphBoxIdx;
88ANALYZE VERBOSE TestSets;
89
90
91DROP INDEX IF EXISTS SchedQueuesItemIdx;
92CREATE INDEX SchedQueuesItemIdx ON SchedQueues(idItem);
93\d SchedQueuesItemIdx;
94DROP INDEX IF EXISTS SchedQueuesSchedGroupIdx;
95CREATE INDEX SchedQueuesSchedGroupIdx ON SchedQueues(idSchedGroup);
96\d SchedQueuesSchedGroupIdx;
97ANALYZE VERBOSE SchedQueues;
98
Note: See TracBrowser for help on using the repository browser.

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