Skip site navigation (1) Skip section navigation (2)


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: (view raw, whole thread or download thread mbox)
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...



In response to

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

pgsql-performance by date

Next:From: Tom LaneDate: 2007-06-26 01:07:14
Subject: Re:
Previous:From: Jim NasbyDate: 2007-06-26 00:19:01
Subject: Re: Volunteer to build a configuration tool

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group