As I've understood the docs those 2 limits should not take effect, because the performance is going down when adding two aggregated columns, but only when enable_material is on.
2011/5/25 Tom Lane <t...@sss.pgh.pa.us> > Robert Haas <robertmh...@gmail.com> writes: > > On Tue, May 24, 2011 at 3:32 PM, Jasmin Dizdarevic > > <jasmin.dizdare...@gmail.com> wrote: > >> enable_material = off > > > Is there any chance you can reproduce this with a simpler test case > > that doesn't involve quite so many joins? > > I didn't stop to count, but are there enough that join_collapse_limit > or from_collapse_limit could be in play? > > regards, tom lane >