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

opt: consider limit hint when costing distinct-on expressions #122442

Merged
merged 3 commits into from
Apr 18, 2024

Commits on Apr 16, 2024

  1. opt: add coster tests for disctinct-on expressions

    This commit adds coster tests for distinct-on expressions. There were no
    such tests before.
    
    Release note: None
    mgartner committed Apr 16, 2024
    Configuration menu
    Copy the full SHA
    6c8443d View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2024

  1. opt: consider limit hint when costing distinct-on expressions

    Limit hints are now considered when costing DistinctOn expressions,
    similarly to streaming GroupBy expressions. This matches the behavior of
    the execution logic, where a DistinctOn emits a row with distinct
    grouping columns as soon as it is read from its input. It does not need
    to read all of its input to begin emitting rows.
    
    Release note (performance improvement): The optimizer now costs
    distinct-on operators more accurately. It may produce more efficient
    query plans in some cases.
    mgartner committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    99faace View commit details
    Browse the repository at this point in the history
  2. opt: add optimizer_use_improved_distinct_on_limit_hint_costing

    The `optimizer_use_improved_distinct_on_limit_hint_costing` session
    setting has been added which enables the improved costing of DistinctOn
    expressions with limit hints added in the previous commit. It is enabled
    by default.
    
    Release note: None
    mgartner committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    af62526 View commit details
    Browse the repository at this point in the history