Re: Mystefied at poor performance of a standard query

From: "David logan" <djlogan2(at)comcast(dot)net>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Mystefied at poor performance of a standard query
Date: 2008-10-01 16:38:21
Message-ID: 006b01c923e4$25da50f0$718ef2d0$@net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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(at)postgresql(dot)org
[mailto:pgsql-performance-owner(at)postgresql(dot)org] On Behalf Of Tom Lane
Sent: Wednesday, October 01, 2008 07:30
To: David logan
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: [PERFORM] Mystefied at poor performance of a standard query

"David logan" <djlogan2(at)comcast(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2008-10-01 20:12:59 Re: Confusing Query Performance
Previous Message Tom Lane 2008-10-01 13:30:12 Re: Mystefied at poor performance of a standard query