-
Notifications
You must be signed in to change notification settings - Fork 713
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
FB8-167: Add variable to force range plans if force index is used #967
Conversation
PR was updated according to comments. |
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 with saving/restoring session var issue addressed
Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Summary: Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Originally Reviewed By: hermanlee fbshipit-source-id: 4a4641b
Because of conflicts I removed changes in mysql-test/t/all_persisted_variables.test. This test has to be modified at let $total_persistent_vars=XXX; (+1 increase) and it should be re-recorded. |
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.
@lth has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Because of conflicts I removed changes in mysql-test/t/all_persisted_variables.test. This test has to be modified at let $total_persistent_vars=XXX; (+1 increase) and it should be re-recorded. ``` Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Originally Reviewed By: hermanlee fbshipit-source-id: 4a4641b ``` Pull Request resolved: #967 Reviewed By: lth Differential Revision: D14387089 Pulled By: lth fbshipit-source-id: 49c95f15964
Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: #967 Reviewed By: lth Differential Revision: D14387089 Pulled By: lth fbshipit-source-id: 0525967
Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: #967 Reviewed By: lth Differential Revision: D14387089 Pulled By: lth fbshipit-source-id: 270826c
…cebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lth Differential Revision: D14387089 Pulled By: lth fbshipit-source-id: 270826c
…cebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lth Differential Revision: D14387089 Pulled By: lth fbshipit-source-id: 270826c
…cebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lth Differential Revision: D14387089 Pulled By: lth fbshipit-source-id: 270826c
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…rcona#967) (percona#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook/mysql-5.6@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook/mysql-5.6#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
…cebook#967) (facebook#967) Summary: Jira ticket: https://jira.percona.com/browse/FB8-167 Reference Patch: facebook@b01ff6a Currently, when force index is used, full table scans are highly penalized, but it is still possible to do a full index scan which is expensive. In many cases, we only use force index when we know there is better way to traverse the index, and not necessarily because we want a full index scan. To address these cases, add a session variable called optimizer_force_index_for_range, which when turned on, will try to search for a 'range' plan before falling back to an index plan. Pull Request resolved: facebook#967 Reviewed By: lloyd Differential Revision: D14387089 Pulled By: lth
Because of conflicts I removed changes in mysql-test/t/all_persisted_variables.test. This test has to be modified at let $total_persistent_vars=XXX; (+1 increase) and it should be re-recorded.