sql: cache sequence descriptors#28576
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Aug 14, 2018
Merged
Conversation
Member
4dc38d6 to
9722d1c
Compare
`nextval()` was using uncached sequence descriptors. There is no reason to do so anymore. Release note (performance improvement): SQL sequences receive a slight performance boost in the `nextval()` built-in function.
9722d1c to
ab37973
Compare
Member
|
LGTM |
Contributor
Author
|
thank you! bors r+ |
craig bot
pushed a commit
that referenced
this pull request
Aug 14, 2018
28573: roachtest: fix queue failure message r=petermattis a=tschottdorf It was using a global variable instead of the one it wanted. Touches #28372. Release note: None 28576: sql: cache sequence descriptors r=knz a=knz Required for the tests in #28575. `nextval()` was using uncached sequence descriptors. There is no reason to do so anymore. Release note (performance improvement): SQL sequences receive a slight performance boost in the `nextval()` built-in function. Co-authored-by: Tobias Schottdorf <tobias.schottdorf@gmail.com> Co-authored-by: Raphael 'kena' Poss <knz@cockroachlabs.com>
Contributor
Build succeeded |
Contributor
|
Nice! Out of curiosity, what changed that allowed this? I remember being confused about which function to use to get the table descriptor (cached, not cached, etc) when I first wrote this. |
Contributor
Author
|
When you first wrote this we had bugs in the lookup of descriptors that were created in the same txn so a call to nextval would hang. Vivek fixed this over the course of the past few months so now it's safe. |
Contributor
|
Excellent; thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Required for the tests in #28575.
nextval()was using uncached sequence descriptors.There is no reason to do so anymore.
Release note (performance improvement): SQL sequences receive a slight
performance boost in the
nextval()built-in function.