Add indexes to ci_job_artifacts referenced FK
Ref: &11817 (closed)
What does this MR do and why?
Following up !138898 (merged)
This will be no-op
operation gitlab.com
.
This MR adds a migration which will create 2 indexes for users outside of gitlab.com
as explained in our documentation.
Why are we doing this?
Those indexes are required in order to partition ci_job_artifacts
as all FK referenced should include the partition key in order to be able to partition our table.
Database
+ "index_ci_build_trace_metadata_on_trace_artifact_id_partition_id" btree (trace_artifact_id, partition_id)
+ "index_ci_job_artifact_states_on_job_artifact_id_partition_id" btree (job_artifact_id, partition_id)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Max Orefice