Re: [Bizgres-general] A Guide to Constraint Exclusion (

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Luke Lonergan <llonergan(at)greenplum(dot)com>
Cc: Hannu Krosing <hannu(at)skype(dot)net>, bizgres-general <bizgres-general(at)pgfoundry(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [Bizgres-general] A Guide to Constraint Exclusion (
Date: 2005-07-14 22:27:28
Message-ID: 1121380048.3970.494.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2005-07-14 at 15:07 -0700, Luke Lonergan wrote:
> Hannu,
>
> >> My comment was too terse. What I meant was that you can't do dynamic
> >> exclusion based upon the results of a join. i.e. PPUC2
> >
> > but what about _static_ exlusion based on constraints ?
> >
> > I mean if there is a left side table with say a single partition having
> > CHECK(id_order BETWEEN 1 AND 1000)
> > (either originally or left after eliminating other by other constraints)
> >
> > and 3 right side partition with
> > CHECK(key_order BETWEEN 1 AND 1000)
> > CHECK(key_order BETWEEN 1001 AND 2000)
> > CHECK(key_order BETWEEN 2001 AND 3000)
> >
> > then the 3rd one could be eliminated statically from a join on
> > id_order=key_order
>
> I would expect that the 2nd and 3rd partitions would be CE'ed if the basic
> support is there. Does your current implementation include this capability
> Simon?

No

> Or is it limited to use with constant predicates?

Yes.

It's the first time I've thought to compare the constraint predicates on
joined tables based upon the join restriction. That's possible, but
would take some time to work out.

I've argued that such a construct is not common. I'm open to suggestions
about what *is* common...

Best Regards, Simon Riggs

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2005-07-14 22:30:08 Re: [Bizgres-general] A Guide to Constraint Exclusion
Previous Message Simon Riggs 2005-07-14 22:22:03 Re: [Bizgres-general] A Guide to Constraint Exclusion (