pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mladen Gogala <mladen.gogala@vmsinfo.com>
To: Scott Carey <scott@richrelevance.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org Performance <pgsql-performance@postgresql.org>
Subject: Re: HashJoin order, hash the large or small table? Postgres likes to hash the big one, why?
Date: Tue, 19 Oct 2010 10:22:42 -0400
Message-ID: <4CBDA9B2.2040807@vmsinfo.com> (raw)
In-Reply-To: <56326542-EFD1-493D-BD35-CD67FB004CF4@richrelevance.com>
References: <A82128A6-4E3B-43BD-858D-21B129F7BEEB@richrelevance.com>
	<1532.1287459825@sss.pgh.pa.us>
	<56326542-EFD1-493D-BD35-CD67FB004CF4@richrelevance.com>

Scott Carey wrote:
>
> If the cost to hash is 1200493, and it needs to probe the hash 20241 times, why would the total cost be 631471410?  The cost to probe can't be that big! A cost of 500 to probe and join?  
> Why favor hashing the large table and probing with the small values rather than the other way around?
>   
>

May I ask a stupid question: how is the query cost calculated? What are 
the units? I/O requests? CPU cycles? Monopoly money?


-- 
 
Mladen Gogala 
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251
http://www.vmsinfo.com 
The Leader in Integrated Media Intelligence Solutions






view thread (15+ messages)  latest in thread

Message-ID: <4CBDA9B2.2040807@vmsinfo.com>
Permalink:  ../4CBDA9B2.2040807@vmsinfo.com/
Also on:    postgresql.org/message-id/4CBDA9B2.2040807@vmsinfo.com

 · 

reply

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: mladen.gogala@vmsinfo.com, scott@richrelevance.com, tgl@sss.pgh.pa.us
  Subject: Re: HashJoin order, hash the large or small table? Postgres likes to hash the big one, why?
  In-Reply-To: <4CBDA9B2.2040807@vmsinfo.com>

* 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