The docs contain the following sage advice concerning from_collapse_limit: "It is usually wise to keep this less than geqo_threshold."
I've been thinking through this advice on and off for about 2 years and I still don't understand it. The point of either from_collapse_limit and geqo_threshold is to avoid exponential growth in planning time when planning large join nests. Either of them has the effect of reducing planning time at the expense of possibly getting an inferior plan. However, it's my experience that the plans that result when the from_collapse_limit kicks in are almost invariably terrible when fetching only a small number of rows. On the other hand, the few GEQO plans I've had experience with have been pretty reasonable. It appears that this statement has been in our documentation since Tom Lane added FROM_COLLAPSE_LIMIT (back then, it was capitalized) on January 25, 2003 (9bf97ff426de9), but I can't find any justification for it anywhere. I think we either need to justify this advice, or remove it. ...Robert -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers