Re: Is there value in having optimizer stats for joins/foreignkeys?

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tomas Vondra <tomas(at)vondra(dot)me>, pgsql-hackers(at)lists(dot)postgresql(dot)org, hs(at)cybertec(dot)at, Jeff Davis <pgsql(at)j-davis(dot)com>
Subject: Re: Is there value in having optimizer stats for joins/foreignkeys?
Date: 2025-12-02 03:18:24
Message-ID: CADkLM=fEi_GeeS3zyg6B5WgswyPe0wNXHfKQOxjy8A5fXHD7=A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
>
> Yeah, I think that automated choices about this are unlikely to work
> well. We chose the syntax for CREATE STATISTICS with an eye to
> allowing users to declaratively tell us to collect stats about
> specific joins, and I still think that's a more promising approach.
> But nobody's yet worked out any details.
>
>
Per other response, no, I didn't envision stats on all possible joins or
even all possible foreign keys, just the ones we declare as interesting,
and even then only for the attributes that we say are interesting on the
far side of the join.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kirill Reshke 2025-12-02 03:32:44 Re: [PATCH] Add hint for misspelled relations
Previous Message Corey Huinker 2025-12-02 03:16:25 Re: Is there value in having optimizer stats for joins/foreignkeys?