Speed up the listing of jobset evals by caching some info in the DB
This denormalises the database, but it's the best we can do until PostgreSQL has materialised views.
This commit is contained in:
parent
034d50069b
commit
aaacf9eda3
7
src/sql/upgrade-7.sql
Normal file
7
src/sql/upgrade-7.sql
Normal file
|
@ -0,0 +1,7 @@
|
|||
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;
|
Loading…
Reference in a new issue