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

Dean Rasheed <dean.a.rasheed@gmail.com>

From: Dean Rasheed <dean.a.rasheed@gmail.com>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Pierre Ducroquet <p.psql@pinaraf.info>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-03-28T13:18:17Z
Lists: pgsql-hackers
On Wed, 25 Mar 2020 at 00:28, Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote:
>
> Seems OK to me.
>
> I'd perhaps name deps_clauselist_selectivity differently, it's a bit too
> similar to dependencies_clauselist_selectivity. Perhaps something like
> clauselist_apply_dependencies? But that's a minor detail.
>

OK, I've pushed that with your recommendation for that function name.

Regards,
Dean



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