« Return to Thread: Mystefied at poor performance of a standard query

Re: Mystefied at poor performance of a standard query

by Tom Lane-2 :: Rate this Message:

Reply to Author | View in Thread

"David logan" <djlogan2@...> 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@...)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

 « Return to Thread: Mystefied at poor performance of a standard query

LightInTheBox - Buy quality products at wholesale price!