From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Merlin Moncure <mmoncure(at)gmail(dot)com>, Matthew Wakeling <matthew(at)flymine(dot)org>, Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Really dumb planner decision |
Date: | 2009-04-16 15:49:14 |
Message-ID: | 603c8f070904160849j104689dbvdd8fbd5b126e0e26@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Thu, Apr 16, 2009 at 9:49 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Merlin Moncure <mmoncure(at)gmail(dot)com> writes:
>> On Thu, Apr 16, 2009 at 8:05 AM, Matthew Wakeling <matthew(at)flymine(dot)org> wrote:
>>> That solves the problem. So, a view is treated as a subquery then?
>
>> no...the view is simply inlined into the query (think C macro) using
>> the rules. You just bumped into an arbitrary (and probably too low)
>> limit into the number of tables the planner can look at in terms of
>> optimizing certain types of plans.
>
> Bear in mind that those limits exist to keep you from running into
> exponentially increasing planning time when the size of a planning
> problem gets big. "Raise 'em to the moon" isn't really a sane strategy.
> It might be that we could get away with raising them by one or two given
> the general improvement in hardware since the values were last looked
> at; but I'd be hesitant to push the defaults further than that.
I hasten to point out that I only suggested raising them to the moon
as a DEBUGGING strategy, not a production configuration.
I do however suspect that raising the defaults would be a good idea.
It seems that the limit has been 8 since those parameters were added
back in January of 2003, and yes, hardware is a lot better now. We
should probably raise geqo_threshold at the same time, since that's
supposed to be larger than these parameters and the default is only
12.
...Robert
From | Date | Subject | |
---|---|---|---|
Next Message | Lists | 2009-04-16 15:52:32 | Re: Shouldn't the planner have a higher cost for reverse index scans? |
Previous Message | Tom Lane | 2009-04-16 15:42:43 | Re: Shouldn't the planner have a higher cost for reverse index scans? |