Re: Can dml realize the partition table's rule and make good execution plan? - Mailing list pgsql-general

From Craig Ringer
Subject Re: Can dml realize the partition table's rule and make good execution plan?
Date
Msg-id 50A0A00C.4020401@2ndQuadrant.com
Whole thread Raw
In response to Re: Can dml realize the partition table's rule and make good execution plan?  (高健 <luckyjackgao@gmail.com>)
Responses Re: Can dml realize the partition table's rule and make good execution plan?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On 11/12/2012 02:24 PM, 高健 wrote:
> Hi Craig:
> Thank you for your reply.
> I checked for constratint_exclusion , in my sample, on and partition
> is same(I have no data on parent table). it really works for me.
> I tried and found that constraint_exclusion can work in simple ways ,
> but not for complicated conditions such as "id=a or id=b".
> And the union all of two simple query really produced a lower cost.
For now you'll probably need to use that approach - UNION ALL of simpler
queries. It's cumbersome and annoying, though.

It'd be really interesting to enhance the query planner to be smarter
about this particular case, but the planner is way past my
scary-code-voodoo level so I can't really help there; I'm more
interested in usability issues in the tools for any development time I get.

--
Craig Ringer


pgsql-general by date:

Previous
From: Bernardo Carneiro
Date:
Subject: Enabling unaccent module on all schemas
Next
From: "Albe Laurenz"
Date:
Subject: Re: explain plan visibility