Index: /trunk/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseComments.pgsql
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseComments.pgsql	(revision 61472)
+++ /trunk/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseComments.pgsql	(revision 61473)
@@ -507,4 +507,9 @@
 
 
+COMMENT ON COLUMN SchedGroups.sComment IS
+  'The Validation Kit build source (@VALIDATIONKIT_ZIP@).
+Non-unique foreign key: BuildSources(idBuildSrc)';
+
+
 COMMENT ON TABLE SchedGroupMembers IS
   'N:M relationship between scheduling groups and test groups.
@@ -550,4 +555,44 @@
 
 
+COMMENT ON TABLE TestBoxStrTab IS
+  'String table for the test boxes.
+
+This is a string cache for all string members in TestBoxes except the name.
+The rational is to avoid duplicating large strings like sReport when the
+testbox reports a new cMbScratch value or the box when the test sheriff
+sends a reboot command or similar.
+
+At the time this table was introduced, we had 400558 TestBoxes rows,  where
+the SUM(LENGTH(sReport)) was 993MB.  There were really just 1066 distinct
+sReport values, with a total length of 0x3 MB.
+
+Nothing is ever deleted from this table.
+
+@note Should use a stored procedure to query/insert a string.
+
+
+TestBox stats prior to conversion:
+     SELECT COUNT(*) FROM TestBoxes:                     400558 rows
+     SELECT pg_total_relation_size(''TestBoxes''):      740794368 bytes (706 MB)
+     Average row cost:           740794368 / 400558 =      1849 bytes/row
+
+After conversion:
+     SELECT COUNT(*) FROM TestBoxes:                     400558 rows
+     SELECT pg_total_relation_size(''TestBoxes''):      144375808 bytes (138 MB)
+     SELECT COUNT(idStr) FROM TestBoxStrTab:               1292 rows
+     SELECT pg_total_relation_size(''TestBoxStrTab''):    5709824 bytes (5.5 MB)
+                  (144375808 + 5709824) / 740794368 =        20 %
+     Average row cost boxes:     144375808 / 400558 =       360 bytes/row
+     Average row cost strings:       5709824 / 1292 =      4420 bytes/row';
+
+
+COMMENT ON COLUMN TestBoxStrTab.sValue IS
+  'The string value.';
+
+
+COMMENT ON COLUMN TestBoxStrTab.tsCreated IS
+  'Creation time stamp.';
+
+
 COMMENT ON TYPE TestBoxCmd_T IS
   'Testbox commands.';
@@ -603,9 +648,4 @@
 
 
-COMMENT ON COLUMN TestBoxes.sDescription IS
-  'Optional testbox description.
-Intended for describing the box as well as making other relevant notes.';
-
-
 COMMENT ON COLUMN TestBoxes.fEnabled IS
   'Indicates whether this testbox is enabled.
@@ -619,24 +659,4 @@
 
 
-COMMENT ON COLUMN TestBoxes.sOs IS
-  'Same abbrieviations as kBuild, see KBUILD_OSES.';
-
-
-COMMENT ON COLUMN TestBoxes.sOsVersion IS
-  'Informational, no fixed format.';
-
-
-COMMENT ON COLUMN TestBoxes.sCpuVendor IS
-  'Same as CPUID reports (GenuineIntel, AuthenticAMD, CentaurHauls, ...).';
-
-
-COMMENT ON COLUMN TestBoxes.sCpuArch IS
-  'Same as kBuild - x86, amd64, ... See KBUILD_ARCHES.';
-
-
-COMMENT ON COLUMN TestBoxes.sCpuName IS
-  'The CPU name if available.';
-
-
 COMMENT ON COLUMN TestBoxes.lCpuRevision IS
   'Number identifying the CPU family/model/stepping/whatever.
@@ -665,4 +685,8 @@
 
 
+COMMENT ON COLUMN TestBoxes.fRawMode IS
+  'Set if the test box does raw-mode tests.';
+
+
 COMMENT ON COLUMN TestBoxes.cMbMemory IS
   'The (approximate) memory size in megabytes (rounded down to nearest 4 MB).';
@@ -671,8 +695,4 @@
 COMMENT ON COLUMN TestBoxes.cMbScratch IS
   'The amount of scratch space in megabytes (rounded down to nearest 64 MB).';
-
-
-COMMENT ON COLUMN TestBoxes.sReport IS
-  'Free form hardware and software report field.';
 
 
