Re: [PERFORM] query of partitioned object doesnt use index in qa - Mailing list pgsql-performance

From Andres Freund
Subject Re: [PERFORM] query of partitioned object doesnt use index in qa
Date
Msg-id 862584A2-724B-4F5A-976F-6164AE61BBE5@anarazel.de
Whole thread Raw
In response to Re: [PERFORM] query of partitioned object doesnt use index in qa  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PERFORM] query of partitioned object doesnt use index in qa  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance

On September 15, 2017 1:42:23 PM PDT, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>One thing you could consider doing about this is creating an index
>on (body ->> 'SID'::text), which would prompt ANALYZE to gather
>statistics
>about that expression.  Even if the index weren't actually used in the
>plan, this might improve the estimates and the resulting planning
>choices
>enough to make it worth maintaining such an index.

I'm wondering if we should extend the new CREATE STATISTICS framework to be able to do that without requiring an index.
I.e.allow expressions and add a new type of stats that just correspond to what normal columns have.  Could even create
thatimplicitly for expression indexes, but allow to drop it, if the overtrading isn't worth it. 

Andres
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.


--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

pgsql-performance by date:

Previous
From: Mike Broers
Date:
Subject: Re: [PERFORM] query of partitioned object doesnt use index in qa
Next
From: Tom Lane
Date:
Subject: Re: [PERFORM] query of partitioned object doesnt use index in qa