* Ed Tyrrill (tyrrill_ed(at)emc(dot)com) wrote:
> It seems to me that the first plan is the optimal one for this case, but
> when the planner has more information about the table it chooses not to
> use it. Do you think that if work_mem were higher it might choose the
> first plan again?
Seems likely to me. You understand that you can set the work_mem
whenever you want, right? It's a GUC, so you could issue a 'set
work_mem = blah' in the application code right before and right after
(assuming you're going to continue using the session) this particular
query, or just do it in a seperate session using 'explain' to play
around with what the planner does given different arguments.
'explain's pretty cheap/easy, and you can play around with various
settings to see what PG will do in various cases. Of course, you won't
know the runtimes without doing 'explain analyze', but I think you have
a good idea of the best plan for this query already...
In response to
- Re: at 2007-06-26 00:09:58 from Ed Tyrrill
pgsql-performance by date
|Next:||From: Tom Lane||Date: 2007-06-26 01:07:14|
|Subject: Re: |
|Previous:||From: Jim Nasby||Date: 2007-06-26 00:19:01|
|Subject: Re: Volunteer to build a configuration tool|