]> xenbits.xensource.com Git - osstest.git/commitdiff
schema: Add index to help cs-bisection-step
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 24 Jul 2020 17:43:40 +0000 (18:43 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Fri, 31 Jul 2020 16:09:41 +0000 (17:09 +0100)
cs-bisection step basis search involves looking for recent flights
that weren't broken.  A flight is broken if it has broken steps.
Make an index for this to save it scanning the steps table.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
schema/steps-broken-index.sql [new file with mode: 0644]

diff --git a/schema/steps-broken-index.sql b/schema/steps-broken-index.sql
new file mode 100644 (file)
index 0000000..770747c
--- /dev/null
@@ -0,0 +1,7 @@
+-- ##OSSTEST## 010 Harmless
+--
+-- This index helps cs-bisection-flight check if flighss are broken.
+
+CREATE INDEX steps_broken_idx
+    ON steps (flight)
+ WHERE status='broken';