Re: [Bizgres-general] A Guide to Constraint Exclusion ( - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: [Bizgres-general] A Guide to Constraint Exclusion (
Date
Msg-id 1121379723.3970.487.camel@localhost.localdomain
Whole thread Raw
In response to Re: [Bizgres-general] A Guide to Constraint Exclusion (  ("Luke Lonergan" <llonergan@greenplum.com>)
List 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



pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: [Bizgres-general] A Guide to Constraint Exclusion
Next
From: Simon Riggs
Date:
Subject: Re: [Bizgres-general] A Guide to Constraint Exclusion (