Re: Hash Join performance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vamsidhar Thummala <vamsi(at)cs(dot)duke(dot)edu>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Hash Join performance
Date: 2009-03-13 23:08:11
Message-ID: 22599.1236985691@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Vamsidhar Thummala <vamsi(at)cs(dot)duke(dot)edu> writes:
> I am wondering why are we subtracting the entire Seq Scan time of Lineitem
> from the total time to calculate the HashJoin time.

Well, if you're trying to identify the speed of the join itself and not
how long it takes to provide the input for it, that seems like a
sensible calculation to make.

> Here is another plan I have for the same TPC-H 18 query with different
> configuration parameters (shared_buffers set to 400MB, just for experimental
> purposes) and HashJoin seems to take longer time (at least 155.58s based on
> above calculation):

Yeah, that seems to work out to about 25us per row instead of 3us, which
is a lot slower. Maybe the hash got split up into multiple batches ...
what have you got work_mem set to? Try turning on log_temp_files and
see if it records any temp files as getting created.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Gregory Stark 2009-03-14 01:58:50 Re: 8.4 Performance improvements: was Re: Proposal of tunable fix for scalability of 8.4
Previous Message Vamsidhar Thummala 2009-03-13 22:11:52 Re: Hash Join performance