Re: query against single partition uses index, against master table does seq scan

From: Mike Broers <mbroers(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: query against single partition uses index, against master table does seq scan
Date: 2016-09-22 04:09:12
Message-ID: CAB9893gw+D4dV_5MaytuXVYS6CjjjnVjD88duR_TPkYr_3ijzQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

This is 9.5, sorry I didnt mention that in the initial post. I am guessing
the issue is that the secondary non-indexed criteria is a search through a
jsonb column?

Let me know if I can provide any additional info, as I stated I am working
around it with a subquery at the moment. This seems like it may become a
more frequent ad-hoc need so if there is something else I can do it would
be appreciated.

On Wed, Sep 21, 2016 at 9:11 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Mike Broers <mbroers(at)gmail(dot)com> writes:
> > Hello, I am curious about the performance of queries against a master
> table
> > that seem to do seq scans on each child table. When the same query is
> > issued at a partition directly it uses the partition index and is very
> > fast.
>
> What PG version is that? For me, everything since 9.0 seems to be willing
> to consider the type of plan you're expecting.
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Knels, Udo 2016-09-22 12:39:30 Re: Problem with performance using query with unnest after migrating from V9.1 to V9.2 and higher
Previous Message Tom Lane 2016-09-22 02:11:27 Re: query against single partition uses index, against master table does seq scan