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: 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:22:03
Message-ID: 1121379723.3970.487.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2005-07-14 at 15:16 -0700, Luke Lonergan wrote:
> Simon,
>
> > SELECT
> > FROM Fact, Dimension
> > WHERE Fact.Key = Dimension.Key
> > AND Dimension.DescriptiveField = 'Blah'
>
> So, what happens with this:
>
> SELECT
> FROM Fact, Dimension
> WHERE Fact.Key = Dimension.Key
> AND Fact.part = 100;
>
> With Fact defined with 3 partitions:
> CHECK(Part BETWEEN 1 AND 1000)
> CHECK(Part BETWEEN 1001 AND 2000)
> CHECK(Part BETWEEN 2001 AND 3000)
>
> Will the 2nd and 3rd partitions be eliminated?

Yes.

That is because the clause "part = 100" is a direct restriction on the
partitioned table, using an immutable operator and a constant.

Best Regards, Simon Riggs

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2005-07-14 22:27:28 Re: [Bizgres-general] A Guide to Constraint Exclusion (
Previous Message Hannu Krosing 2005-07-14 22:20:42 Re: [Bizgres-general] A Guide to Constraint Exclusion