pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: pgsql-hackers@postgresql.org
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Bruce Momjian <bruce@momjian.us>
Subject: v10 release notes for extended stats
Date: Sat, 19 Dec 2020 13:39:27 -0600
Message-ID: <20201219193927.GD30237@telsasoft.com> (raw)

2017-03-24 [7b504eb28] Implement multivariate n-distinct coefficients
2017-04-05 [2686ee1b7] Collect and use multi-column dependency stats
2017-05-12 [bc085205c] Change CREATE STATISTICS syntax

The existing notes say:
|Add multi-column optimizer statistics to compute the correlation ratio and number of distinct values (Tomas Vondra, David Rowley, Álvaro Herrera)
|New commands are CREATE STATISTICS, ALTER STATISTICS, and DROP STATISTICS.
|This feature is helpful in estimating query memory usage and when combining the statistics from individual columns.

"correlation ratio" is referring to stxkind=d (dependencies), right ?  That's
very unclear.

"helpful in estimating query memory usage": I guess it means that this allows
the planner to correctly account for large vs small number of GROUP BY values,
but it sounds more like it's going to help a user to estimate memory use.

"when combining the statistics from individual columns." this is referring to
stxkind=d, handling correlated/redundant clauses, but it'd be hard for a user
to know that.

Also, maybe it should say "combining stats from columns OF THE SAME TABLE".

So I propose:
|Allow creation of multi-column statistics objects, for computing the
|dependencies between columns and number of distinct values of combinations of columns
|(Tomas Vondra, |David Rowley, Álvaro Herrera)
|The new commands are CREATE STATISTICS, ALTER STATISTICS, and DROP STATISTICS.
|Improved statistics allow the planner to generate better query plans with more accurate
|estimates of the row count and memory usage when grouping by multiple
|columns, and more accurate estimates of the row count if WHERE clauses apply
|to multiple columns and values of some columns are correlated with values of
|other columns.





view thread (3+ messages)  latest in thread

Message-ID: <20201219193927.GD30237@telsasoft.com>
Permalink:  ../20201219193927.GD30237@telsasoft.com/
Also on:    postgresql.org/message-id/20201219193927.GD30237@telsasoft.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: pryzby@telsasoft.com, tomas.vondra@2ndquadrant.com, bruce@momjian.us
  Subject: Re: v10 release notes for extended stats
  In-Reply-To: <20201219193927.GD30237@telsasoft.com>

* 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