Skip site navigation (1) Skip section navigation (2)

Re: Estimation of HashJoin Cost

From: "Kevin Grittner" <kgrittn(at)mail(dot)com>
To: "Qi Huang" <huangqiyx(at)outlook(dot)com>,pgsql-hackers(at)postgresql(dot)org
Subject: Re: Estimation of HashJoin Cost
Date: 2012-11-01 13:45:18
Message-ID: (view raw or whole thread)
Lists: pgsql-hackers
Qi Huang wrote:

> I need to estimate the hashjoin cost in my research.

> I looked at the code of final_cost_hashjoin() . It is not clear
> what factor it is considering. So, except the I/O to and from disk,
> what other factors are affecting the cost of hahsjoin?

If you don't find it practical to read the code, you could run
ANALYZE of a query which uses a hashjoin with different cost factors
(these can be changed for your current connection with the SET
command) and observe the cost numbers in the output.

> Also, is there any way to force postgres abide on the estimation of
> Hashjoin cost as 3(R+S), which also means, to make hashjoin cost
> mainly spend on I/O?

How useful would that be for workloads where data is fully cached?


pgsql-hackers by date

Next:From: Filip RembiaƂkowskiDate: 2012-11-01 16:33:22
Subject: question on foreign key lock
Previous:From: Mark KirkwoodDate: 2012-11-01 10:08:09
Subject: Re: Autoanalyze of the autovacuum daemon ...

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group