Merge join process
AssigneeUnisys Corporation
InventorLee-Chin Hsu Liu
Life of this patent
Estimating the term…
Loading patent…
AssigneeUnisys Corporation
InventorLee-Chin Hsu Liu
Estimating the term…
A merge join process combines rows from an inner and an outer table when the inner table is indexed on a data column that is common to both tables. The merge join process creates a set of rows from the outer table that satisfy a selection criteria and sorts the rows in the set on the common data column if necessary. The merge join process searches for a matching inner row for each outer row in sequence using the inner table indices until it finds a matching inner row on a data page. The data page is then repeatedly searched for matches on the successive outer rows in the set until the end of the data page is reached. The end of the data page is reached when the value of the common data column in an outer row is greater than a last key that represents the highest value of the common data column in a inner row stored on the data page. The merge join process also determines that a matching inner row does not exist in the inner table when the value of the common data column in an outer row is less than a next key that represents the lowest value of the common data column that has not yet been searched for a match. Thus, the next and last keys reduce the number of scans of the data page. All matching inner rows on the data page are marked as join rows; all outer rows with common data column values between the next and last keys but which did not have matching inner rows are discarded. When the end of the data page is reached, another data page is located and the search is repeated. The subsequent data page is located using the inner table indices or by traversing links between data pages.
In a computer system having at least one processor, a method of joining data rows from an outer table with data rows from an inner table when the inner table rows are indexed on a data column common to both tables, the method comprising the steps of:
A computer-readable medium having computer-executable modules for joining data rows from two tables which have a common data column, where one table is an inner table stored in an data structure based on values in the common data column and the other table is an outer table, the computer-executable modules comprising:
A merge join process for joining data rows from two tables which have a common data column, where one table is an inner table stored in an data structure based on values in the common data column and the other table is an outer table, the merge join process comprising:
Dependencies are inferred from the claim text.