Re: Hash Join node sometimes slow

From: Dave Roberge <droberge(at)bluetarp(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Hash Join node sometimes slow
Date: 2014-07-03 15:14:13
Message-ID: C4ABE222F455C04FB64CC3B7147428894261ACEE@ORD2MBX01C.mex05.mlsrvr.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Tom Lane writes:
> I'd bet on the extra time being in I/O for the per-batch temp files, since it's hard
> to see what else would be different if the data were identical in each run.
> Maybe the kernel is under memory pressure and is dropping the file data from
> in-memory disk cache. Or maybe it's going to disk all the time but the slow runs
> face more I/O congestion.
>
> Personally, for a problem of this size I'd increase work_mem enough so you
> don't get multiple batches in the first place.

Tom thanks for the response. I'm very much a novice in this area - what do you mean by problem of this size, i.e. number of rows, hash memory usage? Does 'shared read' mean either 1) it was read from disk or 2) it was read from in-memory disk cache?

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Huang, Suya 2014-07-04 01:44:02 DB sessions 100 times of DB connections
Previous Message Simon Riggs 2014-07-03 09:34:14 Re: Postgres Replaying WAL slowly