From: David logan <djlogan2@comcast.net>
To: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: Mystefied at poor performance of a standard query
Date: Wed, 1 Oct 2008 10:38:21 -0600
Message-ID: <006b01c923e4$25da50f0$718ef2d0$@net> (raw)
In-Reply-To: <8396.1222867812@sss.pgh.pa.us>
References: <004001c923be$d8b1f730$8a15e590$@net>
<8396.1222867812@sss.pgh.pa.us>
Looks like that worked. I set work_mem to 256MB, and it looks like my
standard sql came back in just a couple of seconds.
Thanks!
-----Original Message-----
From: pgsql-performance-owner@postgresql.org
[mailto:pgsql-performance-owner@postgresql.org] On Behalf Of Tom Lane
Sent: Wednesday, October 01, 2008 07:30
To: David logan
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] Mystefied at poor performance of a standard query
"David logan" <djlogan2@comcast.net> writes:
> (The question is why this simple select takes me 20 minutes to run...)
What have you got work_mem set to? The hash join is not going to be
real fast if it has to split the join into multiple batches, so you
want work_mem large enough to hold the whole inner relation. That would
be at least 20MB in this example, probably quite a bit more after
allowing for per-row overhead in the table.
regards, tom lane
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: djlogan2@comcast.net, tgl@sss.pgh.pa.us
Subject: Re: Mystefied at poor performance of a standard query
In-Reply-To: <006b01c923e4$25da50f0$718ef2d0$@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