]> xenbits.xensource.com Git - osstest.git/commitdiff
cs-bisection-step: temporary table: Insert only rows we care about
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 24 Jul 2020 18:13:22 +0000 (19:13 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Thu, 6 Aug 2020 09:23:19 +0000 (10:23 +0100)
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 <ian.jackson@eu.citrix.com>
---
v2: New patch.

cs-bisection-step

index 1c165b78f6208f7873dbc9099f93442e162a24cb..718c87b0230df010e9ecb97ccec6295bc7b13fdb 100755 (executable)
@@ -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 = <<END;