-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
opt: add generic query plan tests with partial indexes #125871
Conversation
The first two comments are from #125795. |
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.
Reviewed 6 of 6 files at r1, 5 of 5 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @michae2)
120de4d
to
31ad411
Compare
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.
Might also be interesting to see a case something like:
CREATE INDEX partial_idx ON t(k, i) WHERE i = k;
SELECT * FROM t WHERE k = $1 AND i = $1
Reviewed all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (and 1 stale) (waiting on @DrewKimball)
Tests for generic query plans with partial indexes have been added. No code changes are needed in order for a query with a filter like `col = $1` to utilize an index on `(col) WHERE col IS NOT NULL`. Release note: None
31ad411
to
349ec26
Compare
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.
I added a test like that. It seems to work well.
TFTRs!
bors r+
Reviewable status: complete! 0 of 0 LGTMs obtained (and 2 stale) (waiting on @DrewKimball)
Tests for generic query plans with partial indexes have been added. No
code changes are needed in order for a query with a filter like
col = $1
to utilize an index on(col) WHERE col IS NOT NULL
.Epic: CRDB-37712
Release note: None