Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add back the taggables index in the taggings table #556

Merged
merged 1 commit into from
Jun 11, 2014
Merged

add back the taggables index in the taggings table #556

merged 1 commit into from
Jun 11, 2014

Conversation

pcai
Copy link
Contributor

@pcai pcai commented Jun 11, 2014

Resolves issue #509

As explained in the bug, taggings_idx can only be used if tag_id is specified in the where clause due to the nature of compound indexes. This means the following query requires a full table scan: "what are all the tags on this taggable?"

This a regression that is fixed by re-adding a compound index on [:taggable_id, :taggable_type, :context]

seuros added a commit that referenced this pull request Jun 11, 2014
add back the taggables index in the taggings table
@seuros seuros merged commit a857927 into mbleigh:master Jun 11, 2014
@bmjclin7
Copy link

bmjclin7 commented Aug 8, 2014

In the file of add_missing_taggable_index.acts_as_taggable_on_engine.rb, should we add back as below:
add_index :taggings, :tag_id?

tekniklr pushed a commit to tekniklr/acts-as-taggable-on that referenced this pull request Mar 19, 2021
add back the taggables index in the taggings table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants