News for hackers. Stuff that matters.
Re:PostgreSQL 8.3 Released by bayareaguy on Tuesday February 05, 2008 @12:47AM (#109551)
Unfortunately the current PostgreSQL optimizer/executor doesn't do as much as it could when joining records from subtables partitioned with inherits clauses.

If you have a query with a predicate that can be pushed down to a subtable index then you're probably ok. However if you are doing something more intensive like an unqualified aggregation then you'll be in for a disappointment since the executor doesn't know how to preserve ordering when it scans the subtables. It will always give you a hash join or a merge join involving an intermediate sort even when the sort could be avoided by using an index scan of the subtables with something like a priority queue.

This can be worked around by doing your own incremental aggregations over the subtables and combining them, but it's a little bit of a pain.

There are no comments on this comment yet.