pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Apply all available functional dependencies
Date: Mon, 13 Jan 2020 00:21:48 +0000
Message-ID: <E1iqnUK-00054p-CS@gemulon.postgresql.org> (raw)

Apply all available functional dependencies

When considering functional dependencies during selectivity estimation,
it's not necessary to bother with selecting the best extended statistic
object and then use just dependencies from it. We can simply consider
all applicable functional dependencies at once.

This means we need to deserialie all (applicable) dependencies before
applying them to the clauses. This is a bit more expensive than picking
the best statistics and deserializing dependencies for it. To minimize
the additional cost, we ignore statistics that are not applicable.

Author: Tomas Vondra
Reviewed-by: Mark Dilger
Discussion: https://postgr.es/m/20191028152048.jc6pqv5hb7j77ocp@development

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/aaa6761876ba5b06a5c3fa914b2951ace1e31dee

Modified Files
--------------
src/backend/statistics/dependencies.c   | 116 +++++++++++++++++++++-----------
src/test/regress/expected/stats_ext.out |  57 ++++++++++++++++
src/test/regress/sql/stats_ext.sql      |  35 ++++++++++
3 files changed, 169 insertions(+), 39 deletions(-)



Message-ID: <E1iqnUK-00054p-CS@gemulon.postgresql.org>
Permalink:  ../E1iqnUK-00054p-CS@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1iqnUK-00054p-CS@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tomas.vondra@postgresql.org
  Subject: Re: pgsql: Apply all available functional dependencies
  In-Reply-To: <E1iqnUK-00054p-CS@gemulon.postgresql.org>
  References: <E1iqnUK-00054p-CS@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox