* Make the "all" page faster by not doing four identical `select

count(*) …' queries. The reason for this is that

my $nrBuilds = scalar($c->stash->{allBuilds}->search({finished => 1}));

doesn't return an integer, but some magical code reference that when evaluated performs the query and returns an integer. So every use of $nrBuilds in all.tt caused another query. OTOH using …->count causes only one query.

However count(*) still involves a full table scan, so it's still suboptimal.

Created by  Eelco Dolstra  on February 9, 2010
AVOPQAF7SL5PXYEQ3Q42AX5U4LSCBDHPYRAGX3BNKKMQB4P4FQBAC
Change contents