pgsql: Improve estimation of ANDs under ORs using extended statistics.

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Improve estimation of ANDs under ORs using extended statistics.
Date: 2020-12-08 20:12:02
Message-ID: E1kmjL8-00024D-6u@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve estimation of ANDs under ORs using extended statistics.

Formerly, extended statistics only handled clauses that were
RestrictInfos. However, the restrictinfo machinery doesn't create
sub-AND RestrictInfos for AND clauses underneath OR clauses.
Therefore teach extended statistics to handle bare AND clauses,
looking for compatible RestrictInfo clauses underneath them.

Dean Rasheed, reviewed by Tomas Vondra.

Discussion: https://postgr.es/m/CAEZATCW=J65GUFm50RcPv-iASnS2mTXQbr=CfBvWRVhFLJ_fWA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4f5760d4afa9423fe4d38e4cbec48bf5e793e7e5

Modified Files
--------------
src/backend/optimizer/path/clausesel.c | 21 +++++++++++++++++++++
src/backend/statistics/extended_stats.c | 25 +++++++++++++++++++++++++
src/test/regress/expected/stats_ext.out | 4 ++--
3 files changed, 48 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2020-12-08 21:29:58 pgsql: Remove operator_precedence_warning.
Previous Message Dean Rasheed 2020-12-08 19:43:05 pgsql: Improve estimation of OR clauses using multiple extended statist