Skip to content

Fix pipelines chart query timeout

Pavel Shutsin requested to merge 31528-fix-pipelines-charts-timeout into master

What does this MR do?

Improves performance of Pipelines charts by adding new index

Database explains

Migration output

== 20201106134139 AddPipelinesCreatedIndex: reverting =========================
-- transaction_open?()
   -> 0.0000s
-- indexes(:ci_pipelines)
   -> 0.0774s
-- remove_index(:ci_pipelines, {:algorithm=>:concurrently, :name=>:index_ci_pipelines_on_project_id_and_status_and_created_at})
   -> 0.0348s
== 20201106134139 AddPipelinesCreatedIndex: reverted (0.1151s) ================

== 20201106134139 AddPipelinesCreatedIndex: migrating =========================
-- transaction_open?()
   -> 0.0000s
-- index_exists?(:ci_pipelines, [:project_id, :status, :created_at], {:name=>:index_ci_pipelines_on_project_id_and_status_and_created_at, :algorithm=>:concurrently})
   -> 0.0648s
-- add_index(:ci_pipelines, [:project_id, :status, :created_at], {:name=>:index_ci_pipelines_on_project_id_and_status_and_created_at, :algorithm=>:concurrently})
   -> 0.0454s
== 20201106134139 AddPipelinesCreatedIndex: migrated (0.1133s) ================

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #31528 (closed)

Edited by Pavel Shutsin

Merge request reports