Re: BUG #5652: Optimizer does wrong thing with partitioned tables - Mailing list pgsql-bugs

From Robert Haas
Subject Re: BUG #5652: Optimizer does wrong thing with partitioned tables
Date
Msg-id AANLkTi=8HaHLehroY+ZzcJY8M5KG5xKxndKH+pZeud9T@mail.gmail.com
Whole thread Raw
In response to Re: BUG #5652: Optimizer does wrong thing with partitioned tables  (Euler Taveira de Oliveira <euler@timbira.com>)
List pgsql-bugs
On Fri, Sep 10, 2010 at 9:31 AM, Euler Taveira de Oliveira
<euler@timbira.com> wrote:
> Mladen Gogala escreveu:
>> Optimizer chooses to scan each partitioned table sequentially, instead of
>> using the available index:
>>
> This is not a bug. How would the optimizer know that the maximum value is in
> that specific partition? There is neither a global index for a partitioned
> table nor an optimizer artifact to know aggregate information before scanning
> all of the partitions. Maybe when we have a better support for table
> partitioning such optimizer artifact would be implemented but don't hold your
> breath.

I wonder if Merge Append could be made to help with this case.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: BUG #5644: Selecting ROW() in variable with 9.0 not compatible with 8.4
Next
From: Tom Lane
Date:
Subject: Re: BUG #5644: Selecting ROW() in variable with 9.0 not compatible with 8.4