×

System and method for identifying matching portions of two sets of data in a multiprocessor system

  • US 10,642,808 B1
  • Filed: 11/01/2016
  • Issued: 05/05/2020
  • Est. Priority Date: 11/01/2015
  • Status: Active Grant
First Claim
Patent Images

1. A method of joining a first database data set and a second database data set, the method comprising:

  • (A) identifying a size of a storage space to be used for joining the first database data set and the second database data set;

    (B) identifying a number of a plurality of processor cores to be used for joining the first database data set and the second database data set;

    (C) hashing each of a plurality of data elements of the first database data set to produce a first hash result for each of the plurality of data elements, each first hash result comprising a first portion and a second portion, the first and second portions each comprising less than all of the first hash result and not entirely overlapping with each other;

    (D) assigning each of the plurality of data elements of the first database data set to one of a plurality of buffers, responsive to the first portion of the first hash result for each of the respective data elements in the plurality;

    (E) identifying a number of a plurality of sub buffers responsive to the size of the storage space identified, the number of processor cores identified, and a size to be used substantially as a size for each of the plurality of sub buffers, each sub buffer corresponding to a range of potential first hash results, a plurality of the sub buffers corresponding to each buffer;

    (F) by each of the plurality of processor cores, substantially simultaneously with the other processor cores;

    (1) selecting a buffer in the plurality not already selected by any of the plurality of processor cores;

    (2) assigning each of the plurality of data elements assigned to the selected buffer, to one of the sub buffers in the plurality, responsive to the second portion of the first hash result of each said data element and the range of potential first hash results of said one of the sub buffers;

    (3) generating a hash table for each data element assigned to each sub buffer comprising a first alternate hash result for each data element that is generated using, and different from, the first hash result for the data element;

    (4) storing in storage other than random access memory each sub buffer corresponding to the selected buffer and the hash table of said sub buffer; and

    (5) repeating steps (1)-(4) until all buffers in the plurality have been selected;

    (G) receiving a portion, less than all, of a plurality of data elements of the second database data set into a plurality of chunks of memory;

    (H) by each of the plurality of processor cores, substantially simultaneously with the other processor cores;

    (1) selecting one of the plurality of chunks not already selected by any of the plurality of processor cores; and

    (2) for each of the plurality of data elements in the selected chunk;

    a. hashing said data element in the selected chunk to produce a second hash result for said data element;

    b. assigning the data element in the selected chunk to one of a plurality of sub partitions, each of the sub partitions in the plurality being assigned a range of potential second hash results equal to a range of a different one of the sub buffers, said assigning being responsive to the range of potential second hash results of said sub partition and the second hash result of said data element in the second chunk; and

    (3) repeating steps (1) and (2) until all of the chunks have been processed;

    I. by each of the plurality of processor cores, substantially simultaneously with the other processor cores;

    (1) selecting one of the plurality of sub partitions not already selected by any of the plurality of processor cores;

    (2) reading the hash table and data elements of the first database data set of any sub buffer having a range of potential first hash results corresponding to the range of potential second hash results of the selected sub partition;

    (3) for each of the plurality of data elements in the selected sub partition;

    (a) identifying whether a second alternate hash result, generated using, and different from, the second hash result of said data element corresponds to the first alternate hash result; and

    (b) if the second alternate hash result corresponds to the first alternate hash result, comparing said data element in the selected sub partition with the data element in the sub buffer read that corresponds to the corresponding first alternate hash result, and if the comparing results in a match, identifying as matched with said data element in the selected sub partition the data element in the sub buffer read that corresponds to said data element in the selected sub partition; and

    (4) repeating steps (1)-(3) until all of the sub partitions have been selected; and

    (J) Repeating steps G-I until all of the plurality of data elements of the second database data set have been processed as in steps G-I.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×