Commit e68b53f2 authored by Tiger Watson's avatar Tiger Watson

Merge branch '230437-usage-data-optimize-counts-terraform_reports' into 'master'

Optimize counts.terraform_reports usage ping counter

See merge request gitlab-org/gitlab!39499
parents 12a70db6 1a57204e
---
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
......@@ -19234,6 +19234,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