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

2016-09-22 Thread Tom Lane
Mike Broers writes: > This is 9.5, sorry I didnt mention that in the initial post. Hmm, that's odd then. > I am guessing the issue is that the secondary non-indexed criteria is a > search through a jsonb column? Doubt it; it should have considered the plan you are thinking of anyway. Maybe it d

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

2016-09-21 Thread Mike Broers
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 i

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

2016-09-21 Thread Tom Lane
Mike Broers 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

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

2016-09-21 Thread Mike Broers
nan >> >> >> >> -- >> *From:* pgsql-performance-ow...@postgresql.org < >> pgsql-performance-ow...@postgresql.org> on behalf of Mike Broers < >> mbro...@gmail.com> >> *Sent:* Wednesday, September 21, 2016 12:

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

2016-09-21 Thread Mike Broers
uld help, but its just my wish. > > > > Regards, > Ganesh Kannan > > > > -- > *From:* pgsql-performance-ow...@postgresql.org postgresql.org> on behalf of Mike Broers > *Sent:* Wednesday, September 21, 2016 12:53 PM > *To:* pgsql-performance@postgresql.org

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

2016-09-21 Thread Ganesh Kannan
d help, but its just my wish. Regards, Ganesh Kannan From: pgsql-performance-ow...@postgresql.org on behalf of Mike Broers Sent: Wednesday, September 21, 2016 12:53 PM To: pgsql-performance@postgresql.org Subject: [PERFORM] query against single partition uses

[PERFORM] query against single partition uses index, against master table does seq scan

2016-09-21 Thread Mike Broers
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. The partition constraint is in the query criteria. We have non overlappin