Skip to content
GitLab Next
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab FOSS GitLab FOSS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1
    • Merge requests 1
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLab FOSSGitLab FOSS
  • Merge requests
  • !17563

Adding missing indexes migrations from taggings table

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Stan Hu requested to merge sh-add-missing-acts-as-taggable-indices into master Mar 06, 2018
  • Overview 9
  • Commits 1
  • Pipelines 8
  • Changes 3

API requests were timing out because tag_id was missing an index. These migrations were imported by running https://github.com/mbleigh/acts-as-taggable-on#post-installation:

bundle exec rake acts_as_taggable_on_engine:install:migrations

It looks like the acts-as-tagglable gem added the indexes in v4.0.0, but when we upgraded from v3.5.0 (back in 2016 via f571aeb5) we did not add them.

On staging, there are about 10.7 million rows on the taggings table. It took about 30 seconds for each index to be created.

On production, there are about 17.4 million rows, so I suspect the time to be about a minute per index.

Closes #43927 (closed)

Edited Mar 06, 2018 by Stan Hu
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: sh-add-missing-acts-as-taggable-indices