Re: Pre-calculate hash join

From: Robert Gravsjö <robert(at)blogg(dot)se>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Pre-calculate hash join
Date: 2010-01-12 16:19:47
Message-ID: 4B4CA123.6090309@blogg.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dimitri Fontaine skrev 2010-01-12 12.01:
> warren(at)warrenandrachel(dot)com writes:
>
>> When joining two large tables [common in warehousing], a hash join is
>> commonly selected. Calculating hash values for the merge phase is CPU
>> intensive. Is there any way to pre-calculate value hashes to save that
>> time? Would it even grant any performance to skip the build phase of
>> the hash join?
>
> Maybe maintaining a materialized view then using it in the queries would
> be sufficient to solve your problem?
>

Depending on your case creating a temporary table in the beginning of
the session might save you a lot of time if multiple similar queries is
done.

Regards,
roppert

In response to

Browse pgsql-general by date

  From Date Subject
Next Message ChronicDB 2010-01-12 18:59:30 ChronicDB: Live database schema updates with zero downtime
Previous Message Tom Lane 2010-01-12 15:13:32 Re: Weird EXECUTE ... USING behaviour