[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OSSTEST PATCH 7/7] schema: Provide index on flights by start time


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Date: Wed, 19 Aug 2020 17:01:43 +0100
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Delivery-date: Wed, 19 Aug 2020 16:02:17 +0000
  • Ironport-sdr: Hi7luPsYY2MTYMITLuDPYOiEvVCM4nubTIq6/jQSBQA+IwwA2WKXOLhfYzAnjxlGI6c3qBm0vB E+HsiBTgSPIanwKl1rI2qnCTAQdXNDJdaRdLi4YJffF9B68oWDBFFck3VPE8aDtuai1EyUSfqR yIMytJ4Zuy/bgzno2A7QPcSZenN/+epoAEFDOHnkyoPsSTf2v4oDjVbSP2o+e91iZeSI6dS8AF LKNmNLzekQSnjv2CFzHJtH2hSI/g0wWg1YjE+bo4Bg5RiIqEEtqy4yd3fbqXqR+fAH7K2Jj5Sm wmk=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

We often use flight number as a proxy for ordering, but this is not
always appropriate and not always done (and sometimes it's a bit of a
bodge).

Provide an index to find flights by start time.  This significantly
speeds up the host allocation $equivstatusq query, and the duration
estimator.

(I have tested this by creating a trial index in the production
database.  That index can be dropped again, preferably after this
commit makes it to production.)

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 schema/flights-started-index.sql | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 schema/flights-started-index.sql

diff --git a/schema/flights-started-index.sql b/schema/flights-started-index.sql
new file mode 100644
index 00000000..c230d9d8
--- /dev/null
+++ b/schema/flights-started-index.sql
@@ -0,0 +1,7 @@
+-- ##OSSTEST## 011 Harmless
+--
+-- This index helps ts-hosts-allocate-Executive find recent instances
+-- of the same job.  It may be useful for other things too.
+
+CREATE INDEX flights_blessing_started_idx
+    ON flights (blessing, started);
-- 
2.11.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.