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

FB8-167: Add variable to force range plans if force index is used #967

Closed
wants to merge 1 commit into from

Conversation

inikep
Copy link
Contributor

@inikep inikep commented Feb 21, 2019

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: https://github.com/facebook/mysql-5.6/commit/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

mysql-test/t/optimizer_force_index_for_range.test Outdated Show resolved Hide resolved
sql/sys_vars.cc Outdated Show resolved Hide resolved
@inikep
Copy link
Contributor Author

inikep commented Feb 26, 2019

PR was updated according to comments.

Copy link
Contributor

@percona-ysorokin percona-ysorokin left a 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

mysql-test/t/optimizer_force_index_for_range.test Outdated Show resolved Hide resolved
mysql-test/t/optimizer_force_index_for_range.test Outdated Show resolved Hide resolved
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
@inikep
Copy link
Contributor Author

inikep commented Mar 8, 2019

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.

@inikep inikep changed the title WIP FB8-167: Add variable to force range plans if force index is used FB8-167: Add variable to force range plans if force index is used Mar 8, 2019
Copy link

@facebook-github-bot facebook-github-bot left a 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.

@hermanlee hermanlee closed this Mar 11, 2019
facebook-github-bot pushed a commit that referenced this pull request Mar 11, 2019
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
facebook-github-bot pushed a commit that referenced this pull request Mar 21, 2019
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
facebook-github-bot pushed a commit that referenced this pull request Nov 18, 2019
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
@inikep inikep deleted the FB8-167 branch January 7, 2020 10:30
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 21, 2020
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 23, 2020
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 28, 2020
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jun 23, 2023
…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
hermanlee pushed a commit to hermanlee/mysql-5.6 that referenced this pull request Oct 3, 2023
…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
hermanlee pushed a commit to hermanlee/mysql-5.6 that referenced this pull request Oct 18, 2023
…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
inikep pushed a commit to inikep/percona-server that referenced this pull request Apr 17, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Apr 23, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Apr 23, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Apr 25, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 7, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 8, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 9, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 10, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 13, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 15, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 16, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 17, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 17, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 21, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 21, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 30, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jun 14, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jun 19, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jun 20, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jun 21, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jun 25, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 2, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 19, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 19, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 31, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Aug 2, 2024
…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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Aug 6, 2024
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants