Commit d5644099 authored by Marius Bobin's avatar Marius Bobin

Convert project_id column to bigint to increase performance

The `project_id` column on the pending builds table is a big integer and
the one on the `ci_runner_projects` is an integer. Converting the
project id to big integer in the query should improve the planning time.
parent d519789a
......@@ -90,7 +90,7 @@ module Ci
def runner_projects_relation
if ::Feature.enabled?(:ci_pending_builds_project_runners_decoupling, runner, default_enabled: :yaml)
runner.runner_projects.select(:project_id)
runner.runner_projects.select('"ci_runner_projects"."project_id"::bigint')
else
runner.projects.without_deleted.with_builds_enabled
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment