This denormalises the database, but it's the best we can do until PostgreSQL has materialised views.
2JGYLIEC6A4HU6Y4FVMBMAKV4YF2ZNJPVNZGCS4AWDTQW5BWBHXQC
alter table JobsetEvals
add column nrBuilds integer,
add column nrSucceeded integer;
update JobsetEvals e set
nrBuilds = (select count(*) from JobsetEvalMembers m where e.id = m.eval)
where hasNewBuilds = 1;