Commit 1a57204e authored by Alishan Ladhani's avatar Alishan Ladhani

Optimize counts.terraform_reports usage ping counter

(cherry picked from commit c32430c6)
parent 304eb13b
---
title: Optimize counts.terraform_reports usage ping counter
merge_request: 39499
author:
type: performance
# frozen_string_literal: true
class AddIndexToCiJobArtifactsForTerraformReportsId < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
INDEX_NAME = 'index_ci_job_artifacts_id_for_terraform_reports'
disable_ddl_transaction!
def up
add_concurrent_index :ci_job_artifacts, :id, where: 'file_type = 18', name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :ci_job_artifacts, INDEX_NAME
end
end
d4ea24092289f6dba294c502b8ce89748165973fb2d7989fa7615433599a0c0c
\ No newline at end of file
......@@ -19203,6 +19203,8 @@ CREATE UNIQUE INDEX index_ci_instance_variables_on_key ON public.ci_instance_var
CREATE INDEX index_ci_job_artifacts_for_terraform_reports ON public.ci_job_artifacts USING btree (project_id, id) WHERE (file_type = 18);
CREATE INDEX index_ci_job_artifacts_id_for_terraform_reports ON public.ci_job_artifacts USING btree (id) WHERE (file_type = 18);
CREATE INDEX index_ci_job_artifacts_on_expire_at_and_job_id ON public.ci_job_artifacts USING btree (expire_at, job_id);
CREATE INDEX index_ci_job_artifacts_on_file_store ON public.ci_job_artifacts USING btree (file_store);
......
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