]> xenbits.xensource.com Git - osstest.git/commitdiff
schema: Add index for quick lookup by host
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 24 Jul 2020 13:54:32 +0000 (14:54 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Fri, 31 Jul 2020 16:09:41 +0000 (17:09 +0100)
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: Use proper \ escaping for underscores in LIKE

schema/runvars-host-index.sql [new file with mode: 0644]

diff --git a/schema/runvars-host-index.sql b/schema/runvars-host-index.sql
new file mode 100644 (file)
index 0000000..222a0a3
--- /dev/null
@@ -0,0 +1,8 @@
+-- ##OSSTEST## 009 Preparatory
+--
+-- This index helps sg-report-host-history find relevant flights.
+
+CREATE INDEX runvars_host_idx
+    ON runvars (val, flight)
+ WHERE name ='host'
+    OR name LIKE '%\_host';