From: Stephen Frost <sfrost@snowman.net>
To: Ed Tyrrill <tyrrill_ed@emc.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re:
Date: Mon, 25 Jun 2007 20:33:39 -0400
Message-ID: <20070626003339.GH7531@tamriel.snowman.net> (raw)
In-Reply-To: <1182816598.6477.31.camel@nickel.avamar.com>
References: <A23190A408F7094FAF446C1538222F76041E1C28@avaexch01.avamar.com>
<7008.1182809415@sss.pgh.pa.us>
<1182816598.6477.31.camel@nickel.avamar.com>
* Ed Tyrrill (tyrrill_ed@emc.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
Attachments:
signature.asc (application/pgp-signature, 188B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: sfrost@snowman.net, tyrrill_ed@emc.com, tgl@sss.pgh.pa.us
Subject: Re:
In-Reply-To: <20070626003339.GH7531@tamriel.snowman.net>
References: <A23190A408F7094FAF446C1538222F76041E1C28@avaexch01.avamar.com> <7008.1182809415@sss.pgh.pa.us> <1182816598.6477.31.camel@nickel.avamar.com> <20070626003339.GH7531@tamriel.snowman.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox