Re: PATCH: add support for IN and @> in functional-dependency statistics use

Tomas Vondra <tomas.vondra@2ndquadrant.com>

From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: Pierre Ducroquet <p.psql@pinaraf.info>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-03-29T15:27:36Z
Lists: pgsql-hackers
On Sun, Mar 29, 2020 at 10:22:25AM +0100, Dean Rasheed wrote:
>On Sat, 28 Mar 2020 at 13:18, Dean Rasheed <dean.a.rasheed@gmail.com> wrote:
>>
>> OK, I've pushed that with your recommendation for that function name.
>>
>
>Does this now complete everything that you wanted to do for functional
>dependency stats for PG13? Re-reading the thread, I couldn't see
>anything else that needed looking at. If that's the case, the CF entry
>can be closed.
>

Yes. There were two improvements proposed, we've committed one of them
(the IN/ANY operator handling) and the other (containment) needs more
discussion. So I think it's OK to mark this either as committed or maybe
returned with feedback.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Commits

  1. Prevent functional dependency estimates from exceeding column estimates.

  2. Recognize some OR clauses as compatible with functional dependencies

  3. Use multi-variate MCV lists to estimate ScalarArrayOpExpr

  4. Use functional dependencies to estimate ScalarArrayOpExpr