These indices basically did nothing since they put "id" first.
In particular this makes /job/…/all much faster.
762ZKDT3MIPKV547IMOZHL75XDUNCVGSYSSHRXDLL4DWQCP4GKBAC
GUHKIKQRAVZD6DLK34XY46EQEYCE2MM5HLOBD76UBC3VPSCLGU4AC
APURLT2Q3OKS6VF4HUWI3MGENXAKSSUDXI7CQOEGCRTYJRGUNT6QC
N22GPKYTOLZLBGTGDATQDVZ4R5APZEAOIA7L32X4UXBH4XNI7MWAC
OT4YGU4Q2ADFH372RUWU7FJCNOSKPGEBIFZQ5ZGABUSAHTDDTLCAC
C5W3WZ3YKLMDB7P6COIHDKSKSYDGAJBSIFIHFTEKRGSEJX7J7BNAC
D5QIOJGPKQJIYBUCSC3MFJ3TXLPNZ2XMI37GXMFRVRFWWR2VMTFAC
create index IndexBuildsOnJobsetIdFinishedId on Builds(id DESC, finished, job, jobset_id);
create index IndexFinishedSuccessfulBuilds on Builds(id DESC, buildstatus, finished, job, jobset_id) where buildstatus = 0 and finished = 1;
create index IndexBuildsOnJobsetIdFinishedId on Builds(jobset_id, job, finished, id DESC);
create index IndexFinishedSuccessfulBuilds on Builds(jobset_id, job, finished, buildstatus, id DESC) where buildstatus = 0 and finished = 1;
drop index IndexBuildsOnJobsetIdFinishedId;
create index IndexBuildsOnJobsetIdFinishedId on Builds(jobset_id, job, finished, id DESC);
drop index IndexFinishedSuccessfulBuilds;
create index IndexFinishedSuccessfulBuilds on Builds(jobset_id, job, finished, buildstatus, id DESC) where buildstatus = 0 and finished = 1;