Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf/5093~1
Choose a base ref
...
head repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf/5093
Choose a head ref
  • 2 commits
  • 6 files changed
  • 2 contributors

Commits on Mar 26, 2025

  1. Improve group number estimation.

    Estimating GROUP BY x optimisation employs a distinct statistic for column x.
    But if we have an expression like 'x=y' somewhere down the query tree, the
    number of different values can't be more than the smaller distinct value on
    columns 'x' and 'y'. That means it is possible to correct the estimation with
    knowledge provided by the equivalence class.
    
    In this commit, the estimate_num_groups routine is changed to include PathKey
    nodes in the presortedExprs list. With the PathKey node, we can pass through
    its equivalence class members and correct the distinct estimation.
    
    To avoid multiple calls on statistic tuples, the em_ndistinct cache field
    is introduced.
    danolivo authored and Commitfest Bot committed Mar 26, 2025
    Configuration menu
    Copy the full SHA
    096a063 View commit details
    Browse the repository at this point in the history
  2. [CF 5093] Incremental Sort Cost Estimation Instability

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5093
    
    The branch will be overwritten each time a new patch version is posted to
    the thread, and also periodically to check for bitrot caused by changes
    on the master branch.
    
    Patch(es): https://www.postgresql.org/message-id/[email protected]
    Author(s): Andrei Lepikhov
    Commitfest Bot committed Mar 26, 2025
    Configuration menu
    Copy the full SHA
    c04b6f9 View commit details
    Browse the repository at this point in the history
Loading