Re: multivariate statistics v11 - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: multivariate statistics v11
Date
Msg-id 1457467988.15281.23.camel@2ndquadrant.com
Whole thread Raw
In response to Re: multivariate statistics v10  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: multivariate statistics v11  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-hackers
Hi,

attached is v11 of the patch - this is mostly a cleanup of v10, removing
redundant code, adding missing comments, removing obsolete FIXME/TODOs
and so on. Overall this shaves ~20kB from the patch (not a primary
objective, though).

The one thing this (hopefully) fixes is handling of varRelid. Apparently
I got that a slightly wrong in the previous versions.

One thing I'm not quite sure about is schema of the new system catalog.
The existing catalog pg_statistic uses generic design with stakindN,
stanumbersN and stavaluesN columns, while the new catalog uses dedicated
columns for each type of stats (MCV, histogram, ...). Not sure whether
it's desirable to switch to the pg_statistic approach or not.

There are a few things I plan to look into next:

  * possibly more cleanups in clausesel.c (I'm wondering if some pieces
    should be moved to utils/mvstats/*.c)

  * a few FIXMEs in the infrastructure (e.g. deriving a name when not
    specified in CREATE STATISTICS)

  * move the ndistinct coefficients after functional dependencies in
    the patch series (but only use them for GROUP BY for now)

  * extend the functional dependencies to handle multiple columns on
    the left side (condition), i.e. dependencies like (a,b) -> c

  * address a few remaining FIXMEs in MCV/histograms building


regards

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

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Proposal: RETURNING primary_key()
Next
From: Artur Zakirov
Date:
Subject: Re: Proposal: Generic WAL logical messages