×

Optimizing an outer join operation using a bitmap index structure

  • US 6,957,222 B1
  • Filed: 12/31/2001
  • Issued: 10/18/2005
  • Est. Priority Date: 12/31/2001
  • Status: Active Grant
First Claim
Patent Images

1. A method for performing an outer join of at least a first table T1 and a second table T2, where the join has join conditions, each of the tables has an associated Star Map, S1 and S2, respectively, and each Star Map includes bitmap entries having locations indexed by the hash of one or more values associated with one or more join key columns of its associated table, where a bitmap entry in a Star Map, if set, indicates the presence of a row in its associated table that has entries in the one or more join key columns that together hash to the location of the bitmap entry, the method including:

  • a) performing one or more Boolean operations using the bitmap entries of the Star Maps S1 and S2 to produce set bitmap entries in a Star Map SJ where there is a corresponding set bitmap entry in S1 and a corresponding set bitmap entry in S2;

    b) selecting a row from table T1 and hashing the combined entries in the one or more join key columns of the selected T1 row to identify a bitmap entry in SJ;

    c) if the identified bitmap entry in SJ is not set, projecting the selected T1 row with a NULL corresponding to data from table T2; and

    d) if the identified bitmap entry in SJ is set, performing the following;

    d1) if no row in T2 satisfies the join conditions and has entries in its one or more join key columns that together hash to the location of the identified set bitmap entry in SJ, projecting the selected T1 row and a NULL corresponding to data from table T2; and

    d2) otherwise, for each row from T2 that satisfies the join condition and has entries in its one or more join key columns that together hash to the location of the identified set bitmap entry in SJ, projecting the selected T1 row with data from the row from T2;

    e) repeating b)-d) for all rows in T1.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×