[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [OSSTEST PATCH 7/7] schema: Provide index on flights by start time
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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |