From: Ian Jackson Date: Fri, 24 Jul 2020 18:13:22 +0000 (+0100) Subject: cs-bisection-step: temporary table: Insert only rows we care about X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d2fd1434e282c0506e51a4ff7e1f8b97045babe9;p=osstest.git cs-bisection-step: temporary table: Insert only rows we care about Every use of this table has a WHERE or ON which invokes at least one of these conditions. So put only those rows into the table. This provides a significant speedup (which I haven't properly measured). No overall functional change. Signed-off-by: Ian Jackson --- v2: New patch. --- diff --git a/cs-bisection-step b/cs-bisection-step index 1c165b7..718c87b 100755 --- a/cs-bisection-step +++ b/cs-bisection-step @@ -219,7 +219,9 @@ END WHERE t.job = ? AND t.flight = ? - AND t.name LIKE '%buildjob' + AND t.name LIKE '%buildjob' AND +(@{ $qtxt_common_rev_ok->('b') } OR + @{ $qtxt_common_tree_ok->('b') }) AND b.flight = (CASE WHEN t.val NOT LIKE '%.%' THEN t.flight ELSE cast(split_part(t.val, '.', 1) AS int) @@ -239,7 +241,9 @@ END job AS job FROM runvars WHERE job = ? - AND flight = ? + AND flight = ? AND +(@{ $qtxt_common_rev_ok->('runvars') } OR + @{ $qtxt_common_tree_ok->('runvars') }) END my $qtxt_common_results = <