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: use provided ordering in execbuilder, reenable groupby optimization #32307

Merged
merged 2 commits into from Nov 15, 2018

Conversation

Projects
None yet
3 participants
@RaduBerinde
Copy link
Member

RaduBerinde commented Nov 14, 2018

Note: this is on top of #32221, ignore that commit.

opt: use provided ordering in execbuilder

Use the physical.Provided ordering to correctly configure orderings
during execution.

Informs #31882.

Release note: None

opt: reenable GroupBy optional columns optimization

This change re-enables an optimization that sets grouping columns as
optional in the internal GroupBy/DistinctOn ordering. This improves
some cases where we don't have a relevant interesting ordering.

Fixes #31882.

Release note (performance improvement): More efficient execution for
some queries with GROUP BY or DISTINCT ON and an ORDER BY clause where
an index with a suitable ordering is not available.

@RaduBerinde RaduBerinde requested review from rytaft and andy-kimball Nov 14, 2018

@RaduBerinde RaduBerinde requested a review from cockroachdb/sql-opt-prs as a code owner Nov 14, 2018

@cockroach-teamcity

This comment has been minimized.

Copy link
Member

cockroach-teamcity commented Nov 14, 2018

This change is Reviewable

@rytaft

rytaft approved these changes Nov 14, 2018

Copy link
Contributor

rytaft left a comment

:lgtm:

Reviewed 47 of 47 files at r1, 3 of 3 files at r2, 10 of 10 files at r3.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

@RaduBerinde RaduBerinde force-pushed the RaduBerinde:execbuilder-provided branch 2 times, most recently from b781795 to 6ad30c9 Nov 14, 2018

RaduBerinde added some commits Nov 12, 2018

opt: use provided ordering in execbuilder
Use the `physical.Provided` ordering to correctly configure orderings
during execution.

Informs #31882.

Release note: None
opt: reenable GroupBy optional columns optimization
This change re-enables an optimization that sets grouping columns as
optional in the internal GroupBy/DistinctOn ordering. This improves
some cases where we don't have a relevant interesting ordering.

Fixes #31882.

Release note (performance improvement): More efficient execution for
some queries with GROUP BY or DISTINCT ON and an ORDER BY clause where
an index with a suitable ordering is not available.

@RaduBerinde RaduBerinde force-pushed the RaduBerinde:execbuilder-provided branch from 6ad30c9 to 966e131 Nov 15, 2018

@RaduBerinde

This comment has been minimized.

Copy link
Member

RaduBerinde commented Nov 15, 2018

bors r+

craig bot pushed a commit that referenced this pull request Nov 15, 2018

Merge #32307
32307: opt: use provided ordering in execbuilder, reenable groupby optimization r=RaduBerinde a=RaduBerinde

Note: this is on top of #32221, ignore that commit.

#### opt: use provided ordering in execbuilder

Use the `physical.Provided` ordering to correctly configure orderings
during execution.

Informs #31882.

Release note: None

#### opt: reenable GroupBy optional columns optimization

This change re-enables an optimization that sets grouping columns as
optional in the internal GroupBy/DistinctOn ordering. This improves
some cases where we don't have a relevant interesting ordering.

Fixes #31882.

Release note (performance improvement): More efficient execution for
some queries with GROUP BY or DISTINCT ON and an ORDER BY clause where
an index with a suitable ordering is not available.


Co-authored-by: Radu Berinde <radu@cockroachlabs.com>
@craig

This comment has been minimized.

Copy link

craig bot commented Nov 15, 2018

Build failed

@RaduBerinde

This comment has been minimized.

Copy link
Member

RaduBerinde commented Nov 15, 2018

bors r+

craig bot pushed a commit that referenced this pull request Nov 15, 2018

Merge #32307
32307: opt: use provided ordering in execbuilder, reenable groupby optimization r=RaduBerinde a=RaduBerinde

Note: this is on top of #32221, ignore that commit.

#### opt: use provided ordering in execbuilder

Use the `physical.Provided` ordering to correctly configure orderings
during execution.

Informs #31882.

Release note: None

#### opt: reenable GroupBy optional columns optimization

This change re-enables an optimization that sets grouping columns as
optional in the internal GroupBy/DistinctOn ordering. This improves
some cases where we don't have a relevant interesting ordering.

Fixes #31882.

Release note (performance improvement): More efficient execution for
some queries with GROUP BY or DISTINCT ON and an ORDER BY clause where
an index with a suitable ordering is not available.


Co-authored-by: Radu Berinde <radu@cockroachlabs.com>
@craig

This comment has been minimized.

Copy link

craig bot commented Nov 15, 2018

Build succeeded

@craig craig bot merged commit 966e131 into cockroachdb:master Nov 15, 2018

3 checks passed

GitHub CI (Cockroach) TeamCity build finished
Details
bors Build succeeded
Details
license/cla Contributor License Agreement is signed.
Details

@RaduBerinde RaduBerinde deleted the RaduBerinde:execbuilder-provided branch Nov 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment