Apply IndexBuildsOnJobFinishedId to unfinished builds only

[?]
Mar 16, 2016, 2:17 PM
K2WAI5SOA6DT7RZI2HD66Q6HKU7TTO7DQE2YDR24BWLEHYSCLAOAC

Dependencies

  • [2] P57OYJ4P Index builds on stop time
  • [3] YF3HTIPF Use partial indexes
  • [4] 6QRHXIM3 * Speed up the jobset index page. Especially the query to get the
  • [5] LTQMSMYO Get rid of some obsolete indexes
  • [6] FANTYCR7 Materialize the number of finished builds
  • [7] 5L272QSC Speed up the /jobset overview pages a lot
  • [8] E2TOU3L6 * More indices.
  • [9] O25D52TA initial support for mercurial
  • [10] PT5XCF2N Add another index to speed up the jobstatus page
  • [11] C5W3WZ3Y * Index the Builds table on drvPath to prevent a full table scan
  • [12] 2I2ZX6JB * Make the "latest succeeded" query (used by the "latest" channel)
  • [*] N22GPKYT * Put info about logs / build products in the DB.
  • [*] D5QIOJGP * Move everything up one directory.

Change contents

  • replacement in src/sql/hydra.sql at line 640
    [3.104][3.704:804](),[3.183][3.704:804](),[3.2365][3.704:804](),[3.3040][3.704:804]()
    create index IndexBuildsOnJobFinishedId on builds(project, jobset, job, system, finished, id DESC);
    [2.79]
    [3.0]
    create index IndexBuildsOnJobFinishedId on builds(project, jobset, job, system, finished, id DESC) where finished = 0;
  • file addition: upgrade-47.sql (----------)
    [15.3004]
    drop index IndexBuildsOnJobFinishedId;
    create index IndexBuildsOnJobFinishedId on builds(project, jobset, job, system, finished, id DESC) where finished = 0;