Re: Additional Statistics Hooks - Mailing list pgsql-hackers

From David Rowley
Subject Re: Additional Statistics Hooks
Date
Msg-id CAKJS1f85snPMFbYuNAAoVqxOhL8GQWx9Z-UVjjb5j22A=-G8vg@mail.gmail.com
Whole thread Raw
In response to Re: Additional Statistics Hooks  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Additional Statistics Hooks  (Mat Arye <mat@timescale.com>)
List pgsql-hackers
On 13 March 2018 at 11:44, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> While it would certainly be nice to have better behavior for that,
> "add a hook so users who can write C can fix it by hand" doesn't seem
> like a great solution.  On top of the sheer difficulty of writing a
> hook function, you'd have the problem that no pre-written hook could
> know about all available functions.  I think somehow we'd need a way
> to add per-function knowledge, perhaps roughly like the protransform
> feature.

I always imagined that extended statistics could be used for this.
Right now the estimates are much better when you create an index on
the function, but there's no real reason to limit the stats that are
gathered to just plain columns + expression indexes.

I believe I'm not the only person to have considered this. Originally
extended statistics were named multivariate statistics. I think it was
Dean and I (maybe others too) that suggested to Tomas to give the
feature a more generic name so that it can be used for a more general
purpose later.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Anastasia Lubennikova
Date:
Subject: Re: Using base backup exclusion filters to reduce data transferredwith pg_rewind
Next
From: Ashutosh Bapat
Date:
Subject: Re: Additional Statistics Hooks