sg-report-job-history: Show which host test ran on
Add a column listing the host(s) used. We first find the relevant set
of host runvars (with a SELECT DISTINCT) and then look up each var for
each actual flight.
We do the pattern-matching on runvar names in perl to avoid giving the
postgresql optimiser a chance to turn this query into a full table
scan of the runvars table. (A previous iteration of this patch
searched, in the per-flight loop, for all runvars whose name was
appropriately LIKE, with appalling performance.)
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>