On Wed, 10 Jun 2020 at 09:05, Michael Lewis <mlewis@xxxxxxxxxxx> wrote: >> >> the join selectivity functions have yet to learn about extended statistics. > > > That is very interesting to me. So, extended statistics would help to properly estimate the result set coming out of a single table when comparing each of those columns to one or many values, but not when joining up another table? Is that on a roadmap or in progress as far as you know? Yeah, they're currently only used for selectivity estimates on base table. Using extended statistics for join selectivity estimation is being worked on [1], so there's a chance that it may happen for PG14. David [1] https://commitfest.postgresql.org/28/2386/