pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Rick Otten <rottenwindfish@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL mailing lists <pgsql-performance@postgresql.org>
Subject: Re: failing to use index on UNION of matviews (Re: postgresql 10.1 wrong plan in when using partitions bug)
Date: Tue, 6 Feb 2018 12:18:07 -0600
Message-ID: <20180206181807.GC32634@telsasoft.com> (raw)
In-Reply-To: <CAMAYy4JzsBvX+LPunq3Pq0+gyBo31x1HyRD+DiJxjwweAtzSbw@mail.gmail.com>
References: <CA+t6e1m54jrEj7spf9ArH5BJiO-Qznn=_YCRGWWMtohvXg7mEg@mail.gmail.com>
	<CAMAYy4KT-xvP6Q7iBvW5YAmmcrzpyTfACaLdjKn_tTvLNUu9+w@mail.gmail.com>
	<15450.1517758532@sss.pgh.pa.us>
	<CAMAYy4JzsBvX+LPunq3Pq0+gyBo31x1HyRD+DiJxjwweAtzSbw@mail.gmail.com>

On Sun, Feb 04, 2018 at 11:04:56AM -0500, Rick Otten wrote:
> On Sun, Feb 4, 2018 at 10:35 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> > Rick Otten <rottenwindfish@gmail.com> writes:
> > > I'm wrestling with a very similar problem too - except instead of
> > official
> > > partitions I have a views on top of a bunch (50+) of unioned materialized
> > > views, each "partition" with 10M - 100M rows.  On 9.6.6 the queries would
> > > use the indexes on each materialized view.  On 10.1, every materialized
> > > view is sequence scanned.

I think it'd be useful to see the plan from explain analyze, on both the
"parent" view and a child, with and without SET enable_seqscan=off,

Justin




view thread (4+ messages)  latest in thread

Message-ID: <20180206181807.GC32634@telsasoft.com>
Permalink:  ../20180206181807.GC32634@telsasoft.com/
Also on:    postgresql.org/message-id/20180206181807.GC32634@telsasoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: pryzby@telsasoft.com, rottenwindfish@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: failing to use index on UNION of matviews (Re: postgresql 10.1 wrong plan in when using partitions bug)
  In-Reply-To: <20180206181807.GC32634@telsasoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox