Re: query of partitioned object doesnt use index in qa

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-performance(at)postgresql(dot)org, Mike Broers <mbroers(at)gmail(dot)com>, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Subject: Re: query of partitioned object doesnt use index in qa
Date: 2017-09-15 22:26:06
Message-ID: a9e927d0-f908-05bf-83ba-fd252d6bdedb@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 09/16/2017 12:05 AM, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
>> I'm wondering if we should extend the new CREATE STATISTICS
>> framework to be able to do that without requiring an index.
>
> I think that's already on the roadmap --- it's one of the reasons we
> ended up with a SELECT-like syntax for CREATE STATISTICS. But it
> didn't get done for v10.
>

Right. It's one of the things I'd like to be working on after getting in
the more complex statistics types (MCV & histograms).

> If we do look at that as a substitute for "make an expression index
> just so you get some stats", it would be good to have a way to
> specify that you only want the standard ANALYZE stats on that value
> and not the extended ones.
>

Not sure I understand what you mean by "extended" - the statistics we
collect for expression indexes, or the CREATE STATISTICS stuff? I assume
the former, because if you don't want the latter then just don't create
the statistics. Or am I missing something?

regards

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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Konstantin Kivi 2017-09-17 08:34:48 Partitioning perfomance issue
Previous Message Tom Lane 2017-09-15 22:05:31 Re: query of partitioned object doesnt use index in qa