-
Notifications
You must be signed in to change notification settings - Fork 125
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 index on STI type columns #190
Add index on STI type columns #190
Conversation
This follows on from pervious work in this PR ManageIQ/manageiq#9516
@miq-bot add_label performance "sql migration" wip |
@juliancheal Cannot apply the following label because they are not recognized: performance "sql migration" wip |
Looks like there are a few tables that don't exist anymore. Will update PR. |
50f38d9
to
6fa4519
Compare
Seems ok to me. @kbrock Thoughts? |
I had thought we may want to make compound indexes out of these instead of just |
@kbrock what's a compound index? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for circling back Julean
We have a lot of indexes we don't use.
And we have a lot of queries not using indexes
I think just get rid of the event_stream
index and
add_index :dialog_fields, :type | ||
add_index :ems_clusters, :type | ||
add_index :ems_folders, :type | ||
add_index :event_streams, :type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets not add an index to event_streams
unless we know it is needed for an index.
This table is BIG
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed event_streams
6fa4519
to
ff84d67
Compare
@Fryguy merge on 🍏 ? |
Checked commits juliancheal/manageiq-schema@fc898fc~...ff84d67 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This follows on from pervious work in this PR ManageIQ/manageiq#9516
I created this as a new migration and not a cherry-pick to give us an updated timestamp.
/cc @Fryguy @kbrock