-
Notifications
You must be signed in to change notification settings - Fork 900
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
[WIP] add index on STI type columns #9516
[WIP] add index on STI type columns #9516
Conversation
just kicking this build. if it fails again, then please rebase. thnx |
2e2ce95
to
3fd6d94
Compare
hmm, I dont get, why this fails on travis. Locally its green |
with |
3fd6d94
to
c4846a5
Compare
Checked commit durandom@c4846a5 with ruby 2.2.4, rubocop 0.37.2, and haml-lint 0.16.1 db/migrate/20160628142706_add_index_on_all_type_columns.rb
|
making this WIP until I figure out whats causing CI failure @miq-bot add_label wip |
Are the indexes unique or something dumb like that? |
nope, btree indexes |
Database migrations have now been moved to the https://github.com/ManageIQ/manageiq-schema repo. Please see http://talk.manageiq.org/t/new-split-repo-manageiq-schema/2478 for instructions on how to transfer your database migrations. If this PR contains only migrations, I will leave it open for a short time during the transition, after which I will close this if it has not been moved over. |
wondering if some of these indexes should include |
@Fryguy is this something we still want to work on? |
@juliancheal yes, I think this is still a good idea, but it needs to be moved to manageiq-schema. |
@Fryguy ok cool |
This follows on from pervious work in this PR ManageIQ/manageiq#9516
This should be closed in favour of ManageIQ/manageiq-schema#190 |
this adds indexes to all tables that have a
type
column which is used for STIbecause I'm too lazy to do this by hand I created a small script: https://gist.github.com/durandom/b23d7e12722b2ea4f6aee20178ee9cb2
miq_cim_instances
andmiq_workers
)NewWithTypeSti
mixin got mixed inUnfortunately neither the rails api docs nor guides suggest adding an index for that column. And I havent found any recent stuff on the internet. But that does not mean that it does not make sense 😄
@miq-bot add_label performance, sql migration
@kbrock because of performance
@carbonin
@Fryguy because you suggested it :)