Skip to content
GitLab Next
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 43,814
    • Issues 43,814
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,447
    • Merge requests 1,447
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLabGitLab
  • Issues
  • #32229
Closed
Open
Created Sep 18, 2019 by Pavel Shutsin@pshutsin🔮Maintainer0 of 1 task completed0/1 task

Follow-up from "Add concurrent index on merged_at for PA Data migration"

The following discussion from !17054 (merged) should be addressed:

  • @abrandl started a discussion: (+4 comments)

    @pshutsin This isn't going to fix #32206 (closed) fully as this migration is going to run after the migration from !15137 (merged). Note some installs don't differentiate between normal/post-deploy migrations.

    I'd suggest to also change !15137 (merged) to create an index in the post-deploy. This is assuming the migration hasn't been released or deployed yet and we still have time to adjust it.

    Do we need the specialized index (merged_at, id) in other cases too or is (merged_at) enough?

Suggestion

Since (merged_at, id) is used for data migration only and UI can use smaller (merged_at) index we should replace former with latter after data migration is finished.

add_concurrent_index :merge_request_metrics, :merged_at
remove_concurrent_index :merge_request_metrics, [:merged_at, :id]
Assignee
Assign to
Time tracking