From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | from_collapse_limit vs. geqo_threshold |
Date: | 2009-05-21 03:40:31 |
Message-ID: | 603c8f070905202040v66cd3054t434c0b73aa844c63@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Fly.Li | 2009-05-21 04:04:27 | How to issure PQexec is thread safety if use a connceion in two threads? |
Previous Message | Adriano Lange | 2009-05-21 03:06:15 | Re: GEQO: ERX |