* 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

@ -55,7 +55,10 @@ sub getLatestBuilds {
foreach my $system ($job->builds->search({}, {select => ['system'], distinct => 1})) {
my ($build) = $job->builds->search(
{ finished => 1, system => $system->system, %$extraAttrs },
{ join => 'resultInfo', order_by => 'timestamp DESC', rows => 1 });
{ join => 'resultInfo', order_by => 'timestamp DESC', rows => 1
, '+select' => ["resultInfo.releasename", "resultInfo.buildstatus"]
, '+as' => ["releasename", "buildstatus"]
});
push @res, $build if defined $build;
}
}