Skip to content

Add estimates for filter nodes after an aggregation#11469

Merged
sopel39 merged 1 commit intotrinodb:masterfrom
raunaqmorarka:agg-stats
Mar 23, 2022
Merged

Add estimates for filter nodes after an aggregation#11469
sopel39 merged 1 commit intotrinodb:masterfrom
raunaqmorarka:agg-stats

Conversation

@raunaqmorarka
Copy link
Copy Markdown
Member

@raunaqmorarka raunaqmorarka commented Mar 14, 2022

Description

Added a flag optimizer.non-estimatable-predicate-approximation.enabled
which enables approximation of the cost of filters which cannot be
accurately estimated even with complete statistics.

Is this change a fix, improvement, new feature, refactoring, or other?

improvement

Is this a change to the core query engine, a connector, client library, or the SPI interfaces? (be specific)

CBO

How would you describe this change to a non-technical end user or system administrator?

Improves query plans in the presence of filters on aggregates.

Related issues, pull requests, and links

Documentation

( ) No documentation is needed.
(x) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.

Release notes

( ) No release notes entries required.
(x) Release notes entries required with the following suggested text:

# Section
* Improve query plans in the presence of filters on aggregates. ({issue}`11469`)

@cla-bot cla-bot bot added the cla-signed label Mar 14, 2022
@raunaqmorarka raunaqmorarka requested a review from sopel39 March 14, 2022 13:47
Copy link
Copy Markdown
Member

@lukasz-stec lukasz-stec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not an expert here but lgtm

@raunaqmorarka raunaqmorarka force-pushed the agg-stats branch 3 times, most recently from c723a82 to c681de0 Compare March 15, 2022 10:51
@raunaqmorarka raunaqmorarka changed the title Add aggregate symbol stats for min/max/sum/count Add estimates for filter nodes after an aggregation Mar 15, 2022
@raunaqmorarka raunaqmorarka force-pushed the agg-stats branch 7 times, most recently from 0eda3a8 to b63bcff Compare March 15, 2022 18:17
@raunaqmorarka raunaqmorarka marked this pull request as ready for review March 15, 2022 18:24
@raunaqmorarka raunaqmorarka requested a review from sopel39 March 15, 2022 18:24
@raunaqmorarka
Copy link
Copy Markdown
Member Author

Copy link
Copy Markdown
Member

@sopel39 sopel39 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm % comments

@raunaqmorarka raunaqmorarka force-pushed the agg-stats branch 2 times, most recently from a1bdd0f to 547e6ac Compare March 21, 2022 16:27
@raunaqmorarka raunaqmorarka requested a review from sopel39 March 21, 2022 16:36
@github-actions github-actions bot added the docs label Mar 21, 2022
@sopel39
Copy link
Copy Markdown
Member

sopel39 commented Mar 22, 2022

lgtm % comments

@sopel39
Copy link
Copy Markdown
Member

sopel39 commented Mar 22, 2022

not that for only regression (partitioned q64) memory consumption for the query is greatly reduced, so it's still a win

Added a flag optimizer.non-estimatable-predicate-approximation.enabled
which enables approximation of the cost of filters which cannot be
accurately estimated even with complete statistics.
@sopel39 sopel39 merged commit 7a41bfc into trinodb:master Mar 23, 2022
@raunaqmorarka raunaqmorarka deleted the agg-stats branch March 23, 2022 14:26
@sopel39 sopel39 mentioned this pull request Mar 23, 2022
@github-actions github-actions bot added this to the 375 milestone Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants