Pre-calculate hash join

Started by Nonameabout 16 years ago3 messagesgeneral
Jump to latest
#1Noname
warren@warrenandrachel.com

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?

-Warren

#2Dimitri Fontaine
dimitri@2ndQuadrant.fr
In reply to: Noname (#1)
Re: Pre-calculate hash join

warren@warrenandrachel.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?

--
dim

#3Robert Gravsjö
robert@blogg.se
In reply to: Dimitri Fontaine (#2)
Re: Pre-calculate hash join

Dimitri Fontaine skrev 2010-01-12 12.01:

warren@warrenandrachel.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