Re: [SQL] Partitioned tables not using index for min and max 8.2.7?

2009-07-02 Thread Tim Haak
Cool thanks then not something I'm doing wrong :). Is this going to be changed or is changed in a latter version of postgres. (Do I need to do and upgrade or write a work around :) ) Tom Lane wrote: Tim Haak writes: I am running the following query again a partitioned table in 8.2.7. It d

Re: [SQL] Partitioned tables not using index for min and max 8.2.7?

2009-07-01 Thread Tom Lane
Tim Haak writes: > I am running the following query again a partitioned table in 8.2.7. It > does index scans which is unexpected as there are indexes for the > log_date column. The index min/max optimization only works on single tables at the moment. Sorry. regards, t

[SQL] Partitioned tables not using index for min and max 8.2.7?

2009-07-01 Thread Tim Haak
Hi I am running the following query again a partitioned table in 8.2.7. It does index scans which is unexpected as there are indexes for the log_date column. min(log_date) from data.table "Aggregate (cost=739932.02..739932.02 rows=1 width=8)" " -> Append (cost=0.00..685106.21 rows=219303