Skip to content
  • Stan Hu's avatar
    Adding missing indexes on taggings table · f0e67f25cce2
    Stan Hu authored
    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
    f571aeb5ce38dce1a9e5f58d76360836d4a8f8a0) 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
    f0e67f25cce2