Move information about the fair scheduling to `ci_running_builds`
Description
The big queuing SQL query looks for information about the amount of builds running for a given project to calculate "fair scheduling" data.
We can denormalize this information and store in ci_running_builds
to accelerate the big query.
Proposal
Create ci_running_builds
table with id, project_id, build_id, runner_id, runner_type
. Insert a new row into that table if it got picked by a shared runner. Remove the row when a build transitions from running
status to a different state.
Edited by Grzegorz Bizon