* Add some DB indices to make the /releases page much faster.

* Reduce the number of DB queries for the /all and /jobstatus pages.
* Show the Hydra version number.
This commit is contained in:
Eelco Dolstra
2009-03-23 13:52:24 +00:00
parent 0da0384753
commit 12c1d90135
9 changed files with 41 additions and 17 deletions

View File

@ -34,7 +34,13 @@ sub all : Chained('get_builds') PathPart {
$c->stash->{totalBuilds} = $nrBuilds;
$c->stash->{builds} = [$c->stash->{allBuilds}->search(
{finished => 1}, {order_by => "timestamp DESC", rows => $resultsPerPage, page => $page})];
{ finished => 1 },
{ join => 'resultInfo'
, '+select' => ["resultInfo.buildstatus", "resultInfo.releasename"]
, '+as' => ["buildstatus", "releasename"]
, order_by => "timestamp DESC"
, rows => $resultsPerPage
, page => $page })];
}