These queries used to use (jobset, project) based indexes, and the addition of jobset_id makes most of those indexes unusable now.
GUHKIKQRAVZD6DLK34XY46EQEYCE2MM5HLOBD76UBC3VPSCLGU4AC
OT4YGU4Q2ADFH372RUWU7FJCNOSKPGEBIFZQ5ZGABUSAHTDDTLCAC
APURLT2Q3OKS6VF4HUWI3MGENXAKSSUDXI7CQOEGCRTYJRGUNT6QC
N22GPKYTOLZLBGTGDATQDVZ4R5APZEAOIA7L32X4UXBH4XNI7MWAC
D5QIOJGPKQJIYBUCSC3MFJ3TXLPNZ2XMI37GXMFRVRFWWR2VMTFAC
create index IndexBuildsOnJobsetIdFinishedId on Builds(id DESC, finished, job, jobset_id);
-- Add an index like IndexBuildsOnJobFinishedId using jobset_idcreate index IndexBuildsOnJobsetIdFinishedId on Builds(id DESC, finished, job, jobset_id);
-- Add an index like IndexBuildsOnJobFinishedId using jobset_id