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: postgres/postgres
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: postgrespro/postgres
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: clauselist-estimation
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 10 files changed
  • 2 contributors

Commits on May 22, 2024

  1. Configuration menu
    Copy the full SHA
    d206c01 View commit details
    Browse the repository at this point in the history
  2. Estimate joins using extended statistics

    Use extended statistics (MCV) to improve join estimates. In general this
    is similar to how we use regular statistics - we search for extended
    statistics (with MCV) covering all join clauses, and if we find such MCV
    on both sides of the join, we combine those two MCVs.
    
    Extended statistics allow a couple additional improvements - e.g. if
    there are baserel conditions, we can use them to restrict the part of
    the MCVs combined. This means we're building conditional probability
    distribution and calculating conditional probability
    
        P(join clauses | baserel conditions)
    
    instead of just P(join clauses).
    
    The patch also allows combining regular and extended MCV - we don't need
    extended MCVs on both sides. This helps when one of the tables does not
    have extended statistics (e.g. because there are no correlations).
    tvondra authored and danolivo committed May 22, 2024
    Configuration menu
    Copy the full SHA
    59132bf View commit details
    Browse the repository at this point in the history
  3. My Draft

    danolivo committed May 22, 2024
    Configuration menu
    Copy the full SHA
    417809f View commit details
    Browse the repository at this point in the history
Loading