Re: PATCH: multivariate histograms and MCV lists

From: Adrien Nayrat <adrien(dot)nayrat(at)dalibo(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: multivariate histograms and MCV lists
Date: 2017-08-17 10:06:32
Message-ID: 31ee8686-6d62-7f10-4129-7580ec74a710@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 08/14/2017 12:48 AM, Tomas Vondra wrote:
> Hi all,
>
> For PostgreSQL 10 we managed to get the basic CREATE STATISTICS bits in
> (grammar, infrastructure, and two simple types of statistics). See:
>
> https://commitfest.postgresql.org/13/852/
>
> This patch presents a rebased version of the remaining parts, adding more
> complex statistic types (MCV lists and histograms), and hopefully some
> additional improvements.
>
> The code was rebased on top of current master, and I've made various
> improvements to match how the committed parts were reworked. So the basic idea
> and shape remains the same, the tweaks are mostly small.
>
>
> regards
>
>
>
>

Hello,

There is no check of "statistics type/kind" in pg_stats_ext_mcvlist_items and
pg_histogram_buckets.

select stxname,stxkind from pg_statistic_ext ;
stxname | stxkind
-----------+---------
stts3 | {h}
stts2 | {m}

So you can call :

SELECT * FROM pg_mcv_list_items((SELECT oid FROM pg_statistic_ext WHERE stxname
= 'stts3'));

SELECT * FROM pg_histogram_buckets((SELECT oid FROM pg_statistic_ext WHERE
stxname = 'stts2'), 0);

Both crashes.

Unfotunately, I don't have the knowledge to produce a patch :/

Small fix in documentation, patch attached.

Thanks!

--
Adrien NAYRAT

http://dalibo.com - http://dalibo.org

Attachment Content-Type Size
doc.patch text/x-patch 2.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeevan Ladhe 2017-08-17 10:11:40 Re: Adding support for Default partition in partitioning
Previous Message Jeevan Ladhe 2017-08-17 09:59:51 Re: Adding support for Default partition in partitioning