Re: Can dml realize the partition table's rule and make good execution plan?

From: Craig Ringer <craig(at)2ndQuadrant(dot)com>
To: 高健 <luckyjackgao(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Can dml realize the partition table's rule and make good execution plan?
Date: 2012-11-12 07:06:52
Message-ID: 50A0A00C.4020401@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2012-11-12 08:55:25 Re: explain plan visibility
Previous Message 高健 2012-11-12 06:24:23 Re: Can dml realize the partition table's rule and make good execution plan?