Re:

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Ed Tyrrill <tyrrill_ed(at)emc(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-performance(at)postgresql(dot)org
Subject: Re:
Date: 2007-06-26 00:33:39
Message-ID: 20070626003339.GH7531@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

* 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...

Thanks,

Stephen

In response to

  • Re: at 2007-06-26 00:09:58 from Ed Tyrrill

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2007-06-26 01:07:14 Re:
Previous Message Jim Nasby 2007-06-26 00:19:01 Re: Volunteer to build a configuration tool