15 March 2009

DBMS: Hash Joins (Definitions)

"A sophisticated join algorithm that builds an interim structure to derive result sets." (Microsoft Corporation, "SQL Server 7.0 System Administration Training Kit", 1999)

"A method for producing a joined table. Given two input tables Table1 and Table2, processing is as follows: (a) For each row in Table1, produce a hash. Assign the hash to a hash bucket. (b) For each row in Table2, produce a hash. Check if the hash is already in the hash bucket. If it is: there's a join. If it is not: there's no join." (Peter Gulutzan & Trudy Pelzer, "SQL Performance Tuning", 2002)

"An efficient method of searching two tables to be joined when they have very low selectivity (i.e., very few matching values). Common values are matched in fast memory, then the rest of the data record is obtained using hashing mechanisms to access the disk only once for each record." (Sam Lightstone et al, "Physical Database Design: The Database Professional’s Guide to Exploiting Indexes, Views, Storage, and More", 2007)

"A method for joining large data sets. The database uses the smaller of two data sets to build a hash table on the join key in memory. It then scans the larger data set, probing the hash table to find the joined rows." (Oracle, "Database SQL Tuning Guide Glossary", 2013)

"The hash join is based on a hash function that provides access to items in the joining data structure in constant time. A hash function maps arbitrary inputs to fixed length keys, even though the inputs might have variable lengths. The joining data structure for the hash join is a so-called hash map, which implements an associative array that maps keys to values." (Hasso Plattner, "A Course in In-Memory Data Management: The Inner Mechanics of In-Memory Databases" 2nd Ed., 2014)

 "A join in which the database uses the smaller of two tables or data sources to build a hash table in memory. The database scans the larger table, probing the hash table for the addresses of the matching rows in the smaller table." (Oracle, "Oracle Database Concepts")

No comments:

Related Posts Plugin for WordPress, Blogger...

About Me

My photo
Koeln, NRW, Germany
IT Professional with more than 24 years experience in IT in the area of full life-cycle of Web/Desktop/Database Applications Development, Software Engineering, Consultancy, Data Management, Data Quality, Data Migrations, Reporting, ERP implementations & support, Team/Project/IT Management, etc.