Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Force index in unique key range queries #1237

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

Conversation

@timvaillancourt
Copy link
Collaborator

@timvaillancourt timvaillancourt commented Dec 28, 2022
edited
Loading

Description

This PR forces the unique-key index to be used when gathering the min/max range of the unique key

This is to avoid possibilities of the optimizer picking a different index than we planned, discussed in more detail here. cc @morgo / @cyrinux

In case this PR introduced Go code changes:

  • contributed code is using same conventions as original code
  • script/cibuild returns with no formatting errors, build errors or unit test errors.

@timvaillancourt timvaillancourt marked this pull request as ready for review December 28, 2022 23:10
Copy link
Contributor

morgo commented Dec 29, 2022

LGTM

timvaillancourt reacted with thumbs up emoji

Copy link

cyrinux commented Dec 29, 2022

LGTM too 👍🏻

timvaillancourt reacted with thumbs up emoji

Copy link
Contributor

meiji163 commented Dec 7, 2023

LGTM 🚀

@timvaillancourt timvaillancourt merged commit b22229f into github:master Dec 7, 2023
@timvaillancourt timvaillancourt deleted the readMigrationMinMaxValues-force-index branch December 7, 2023 23:37
RainbowDashy pushed a commit to bytebase/gh-ost that referenced this pull request Jan 2, 2024
* WIP
* Pass entire sql.UniqueKey
* newline for limit
* Rename var
---------
Co-authored-by: meiji163 <meiji163@github.com>
d-bytebase pushed a commit to bytebase/gh-ost that referenced this pull request Jan 2, 2024
* Add `focal` build
* upgrade codeQL action to v2
* Pin docker image to stretch (github#1324)
* pin stretch image
* update stretch repo
* Update Dockerfile.test
* parse binlog timestamp in UTC (github#1322)
* upgrade standard library deps (github#1332)
* fix: typo (github#1331)
Co-authored-by: Tim Vaillancourt <tim@timvaillancourt.com>
* Remove stale RELEASE_VERSION file (github#1349)
Signed-off-by: Tim Vaillancourt <tvaillancourt@slack-corp.com>
* Force index in unique key range queries (github#1237)
* WIP
* Pass entire sql.UniqueKey
* newline for limit
* Rename var
---------
Co-authored-by: meiji163 <meiji163@github.com>
* Include git commit in version (github#1347)
* Include git commit in version
Signed-off-by: Tim Vaillancourt <tvaillancourt@slack-corp.com>
* Make --version output change less-breaking
---------
Signed-off-by: Tim Vaillancourt <tvaillancourt@slack-corp.com>
* Fix tokens in inspector logging (github#1226)
* Cleanup whitespace and comments in SQL query text (github#1246)
* Cleanup whitespace in SQL query text
* cleanup
* Add indent
* Update unit tests
* Update unit tests, pt 2
* Fix tweaks
* Fix merge conflict resolution
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
---------
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
* Fix `--version` output (github#1352)
* Fix `--version` output
Signed-off-by: Tim Vaillancourt <tvaillancourt@slack-corp.com>
* Always fallback version/commit if undef
Signed-off-by: Tim Vaillancourt <tvaillancourt@slack-corp.com>
---------
Signed-off-by: Tim Vaillancourt <tvaillancourt@slack-corp.com>
* Update to `go1.21` (github#1351)
* go1.21 + bullseye
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
* go1.21 + bullseye pt 2
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
* checkout before setup-go
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
* go fmt
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
* Use golangci-lint 1.54.2 to support go1.21
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
* stop using io/ioutil to make linter happy
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
* Fix typo
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
* Lint
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
* revert replica-tests CI to ubuntu 20 due to linker errors
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
* Update ensure-go-installed
* use `ubuntu-latest` for `ci` job
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
* stretch -> bullseye
Signed-off-by: Tim Vaillancourt <tvaillancourt@slack-corp.com>
---------
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Tim Vaillancourt <tvaillancourt@slack-corp.com>
* Replace deprecated `github.com/satori/go.uuid` lib (github#1354)
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
* Add `CODEOWNERS` file to auto-request reviews (github#1350)
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
* go mod tidy
* update test
* fix lint
---------
Signed-off-by: Tim Vaillancourt <tvaillancourt@slack-corp.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: Rashiq <rashiq@users.noreply.github.com>
Co-authored-by: meiji163 <meiji163@github.com>
Co-authored-by: guangwu <guoguangwu@magic-shield.com>
Co-authored-by: Tim Vaillancourt <tim@timvaillancourt.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@meiji163 meiji163 meiji163 approved these changes

@rashiq rashiq Awaiting requested review from rashiq rashiq is a code owner

+1 more reviewer

@cyrinux cyrinux cyrinux approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

v1.1.7

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /