Changeset 61470 in vbox for trunk/src/VBox/ValidationKit/testmanager/core/testresults.py
- Timestamp:
- Jun 5, 2016 4:06:40 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/core/testresults.py
r61469 r61470 973 973 ' LIMIT %s OFFSET %s\n' % (cMaxRows, iStart,); 974 974 975 # Note! INNER JOIN TestBoxesWithStrings performs miserable compared to LEFT OUTER JOIN. Doesn't matter for the result 976 # because TestSets.idGenTestBox is a foreign key and unique in TestBoxes. So, let's do what ever is faster. 975 977 sQuery += ' ) AS TestSets\n' \ 976 ' INNER JOIN TestBoxesWithStrings\n' \978 ' LEFT OUTER JOIN TestBoxesWithStrings\n' \ 977 979 ' ON TestSets.idGenTestBox = TestBoxesWithStrings.idGenTestBox' \ 978 980 ' LEFT OUTER JOIN Builds AS TestSuiteBits\n' \ … … 1180 1182 found in all test results. 1181 1183 """ 1182 1184 # Note! INNER JOIN TestBoxesWithStrings performs miserable compared to LEFT OUTER JOIN. Doesn't matter for the result 1185 # because TestSets.idGenTestBox is a foreign key and unique in TestBoxes. So, let's do what ever is faster. 1183 1186 self._oDb.execute('SELECT TestBoxesWithStrings.*\n' 1184 1187 'FROM ( SELECT idTestBox AS idTestBox,\n' … … 1188 1191 ' GROUP BY idTestBox\n' 1189 1192 ' ) AS TestBoxIDs\n' 1190 ' INNER JOIN TestBoxesWithStrings\n'1191 ' ON TestBoxesWithStrings.idGenTestBox = TestBoxIDs.idGenTestBox\n'1193 ' LEFT OUTER JOIN TestBoxesWithStrings\n' 1194 ' ON TestBoxesWithStrings.idGenTestBox = TestBoxIDs.idGenTestBox\n' 1192 1195 'ORDER BY TestBoxesWithStrings.sName\n' ); 1193 1196 aoRet = [] … … 1202 1205 """ 1203 1206 1207 # Using LEFT OUTER JOIN instead of INNER JOIN in case it performs better, doesn't matter for the result. 1204 1208 self._oDb.execute('SELECT TestCases.*\n' 1205 1209 'FROM ( SELECT idTestCase AS idTestCase,\n' … … 1209 1213 ' GROUP BY idTestCase\n' 1210 1214 ' ) AS TestCasesIDs\n' 1211 ' INNER JOIN TestCases ON TestCases.idGenTestCase = TestCasesIDs.idGenTestCase\n'1215 ' LEFT OUTER JOIN TestCases ON TestCases.idGenTestCase = TestCasesIDs.idGenTestCase\n' 1212 1216 'ORDER BY TestCases.sName\n' ); 1217 1213 1218 aoRet = []; 1214 1219 for aoRow in self._oDb.fetchAll():
Note:
See TracChangeset
for help on using the changeset viewer.