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

sql: always collect stats after a table is created #37611

Merged
merged 1 commit into from May 21, 2019

Conversation

Projects
None yet
4 participants
@rytaft
Copy link
Contributor

commented May 20, 2019

Prior to this commit, we only collected automatic statistics on a
CREATE TABLE statement if it was of the form CREATE TABLE AS <query>.
To avoid inconsistencies, this commit changes the logic so we always
create statistics on every successful CREATE TABLE statement.

Fixes #37362

Release note (sql change): CREATE TABLE statements now always trigger automatic
statistics collection on the newly created table.

@rytaft rytaft requested review from justinj and RaduBerinde May 20, 2019

@rytaft rytaft requested review from cockroachdb/sql-execution-prs as code owners May 20, 2019

@cockroach-teamcity

This comment has been minimized.

Copy link
Member

commented May 20, 2019

This change is Reviewable

@rytaft rytaft force-pushed the rytaft:empty-tables branch from 8f0e7a2 to e9eb494 May 20, 2019

@rytaft rytaft requested a review from cockroachdb/sql-async-prs as a code owner May 20, 2019

@RaduBerinde
Copy link
Member

left a comment

:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @justinj and @RaduBerinde)

@justinj
Copy link
Member

left a comment

:lgtm:

Reviewable status: :shipit: complete! 2 of 0 LGTMs obtained (waiting on @justinj)

@rytaft rytaft force-pushed the rytaft:empty-tables branch from e9eb494 to 4662127 May 21, 2019

sql: always collect stats after a table is created
Prior to this commit, we only collected automatic statistics on a
CREATE TABLE statement if it was of the form CREATE TABLE AS <query>.
To avoid inconsistencies, this commit changes the logic so we always
create statistics on every successful CREATE TABLE statement.

Fixes #37362

Release note (sql change): CREATE TABLE statements now always trigger automatic
statistics collection on the newly created table.

@rytaft rytaft force-pushed the rytaft:empty-tables branch from 4662127 to 3aae09b May 21, 2019

@rytaft

This comment has been minimized.

Copy link
Contributor Author

commented May 21, 2019

TFTRs!

bors r+

craig bot pushed a commit that referenced this pull request May 21, 2019

Merge #37611
37611: sql: always collect stats after a table is created r=rytaft a=rytaft

Prior to this commit, we only collected automatic statistics on a
`CREATE TABLE` statement if it was of the form `CREATE TABLE AS <query>`.
To avoid inconsistencies, this commit changes the logic so we always
create statistics on every successful `CREATE TABLE` statement.

Fixes #37362

Release note (sql change): CREATE TABLE statements now always trigger automatic
statistics collection on the newly created table.

Co-authored-by: Rebecca Taft <becca@cockroachlabs.com>
@craig

This comment has been minimized.

Copy link

commented May 21, 2019

Build succeeded

@craig craig bot merged commit 3aae09b into cockroachdb:master May 21, 2019

3 checks passed

GitHub CI (Cockroach) TeamCity build finished
Details
bors Build succeeded
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.