Re: Question about partitioned query behavior

From: Ranga Gopalan <ranga_gopalan(at)hotmail(dot)com>
To: <sfrost(at)snowman(dot)net>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Question about partitioned query behavior
Date: 2010-07-06 21:02:22
Message-ID: SNT129-W389B6BFE3A469C79A3F90B91B20@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


Hi Stephen,

Constraint exclusion was initially partition and I set it to "on" as suggested and
tried that - the query planner in both cases was correctly identifying the specific partitions being queried - the problem seems to be a generic issue related to the way queries on partition tables are handled and how the order by / limit is applied in this scenario.

Thanks,

Ranga

> Date: Tue, 6 Jul 2010 16:26:23 -0400
> From: sfrost(at)snowman(dot)net
> To: ranga_gopalan(at)hotmail(dot)com
> CC: pgsql-performance(at)postgresql(dot)org
> Subject: Re: [PERFORM] Question about partitioned query behavior
>
> Ranga,
>
> * Ranga Gopalan (ranga_gopalan(at)hotmail(dot)com) wrote:
> > It seems that this is an issue faced by others as well - Please see this link: http://stackoverflow.com/questions/2236776/efficient-querying-of-multi-partition-postgres-table
> >
> > Is this a known bug? Is this something that someone is working on or is there a known work around?
>
> Actually, if you look at that, the problem the original poster had was
> that they didn't have constraint_exclusion turned on. Then they were
> complaining about having the (empty) master table and the needed
> partition included (which, really, shouldn't be that big a deal).
>
> Did you look at what the other reply suggested? Do you have
> constraint_exclusion = 'on' in your postgresql.conf?
>
> Thanks,
>
> Stephen

_________________________________________________________________
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Eliot Gable 2010-07-06 21:53:04 Re: Highly Efficient Custom Sorting
Previous Message Stephen Frost 2010-07-06 20:26:23 Re: Question about partitioned query behavior