Claims
- 1. A method of combining a plurality of bitmaps to generate a resulting bitmap that represents the AND operation between said plurality of bitmaps, the method comprising the steps of:
- A) searching said plurality of bitmaps for a first set of overlapping bitmap segments, wherein each bitmap segment from said plurality of bitmaps is associated with a range, wherein each range associated with each bitmap segment of said first set of overlapping bitmap segments overlaps with the ranges associated with all other bitmap segments in said first set of overlapping bitmap segments;
- B) generating a first result based on said first set, wherein said first result is representative of a bitwise AND of said plurality of bitmaps for a range shared by all bitmap segments of said first set of overlapping bitmap segments; and
- C) storing said first result in said resulting bitmap.
- 2. The method of claim 1, further including the steps of:
- D) searching a plurality of bitmaps for a next set of overlapping bitmap segments, wherein each range associated with each bitmap segment of said next set of overlapping bitmap segments overlaps with the ranges associated with all other bitmap segments in said next set of overlapping bitmap segments;
- E) generating a next result based on said next set of overlapping bitmap segments, wherein said next result is representative of a bitwise AND of said plurality of bitmaps for a range shared by all bitmap segments of said next set of overlapping bitmap segments;
- F) storing said next result in said resulting bitmap; and
- G) repeating the steps (D) through (F) until said plurality of bitmaps do not contain another next set of overlapping bitmap segments.
- 3. The method of claim 1, wherein the step of searching said plurality of bitmaps includes searching at least three bitmaps.
- 4. The method of claim 1, further including the steps of:
- establishing a tentative point of alignment for said first set of overlapping bitmap segments, said tentative point of alignment corresponding to the beginning of a range associated with a map from a particular bitmap segment from said set of overlapping bitmap segments;
- determining whether each remaining bitmap segment from said first set of overlapping bitmap segments includes a map associated with a range that overlaps said tentative point of alignment; and
- if each remaining bitmap segment from said first set of overlapping bitmap segments includes a map associated with a range that overlaps said tentative point of alignment, then generating a result representative of a bitwise AND between said plurality of bitmaps for a range having a beginning at said tentative point of alignment.
- 5. The method of claim 4, wherein the step determining whether each remaining bitmap segment from said set of overlapping bitmap segments includes a map further includes inspecting each remaining bitmap segment in an order that corresponds to the sparseness of said remaining bitmap segment.
- 6. The method of claim 4, wherein the step of generating a result representative of a bitwise AND between said plurality of bitmaps for a range having a beginning at said tentative point of alignment further includes:
- finding a minimum map beginning at said tentative point of alignment, wherein each of said set of overlapping bitmap segments contains a map completely overlapping the range associated with said minimum map; and
- generating a result representative of a bitwise AND between said plurality of bitmaps for a range having a beginning at said tentative point of alignment.
- 7. The method of claim 4, further including establishing the end of the range associated with said minimum map as a next tentative point of alignment.
- 8. A method of combining a plurality of bitmaps to generate a resulting bitmap representing the OR operation between said plurality of bitmaps, the method comprising the steps of:
- establishing an aligned set of bitmap segments from said plurality of said bitmaps, wherein said aligned set is associated with an alignment position, wherein said alignment position is associated with a range, wherein each member of said aligned set contains a map overlapping said alignment position;
- performing a bitwise OR operation of maps from said members of said aligned set that overlap said alignment position to generate a first result; and
- establishing said first result as the result representing the bitwise OR operation between said plurality of bitmaps for the range corresponding to said aligned position.
- 9. The method of claim 8, wherein the step of establishing an aligned set includes establishing an aligned set of bitmap segments from a set of at least three bitmaps.
- 10. The method of claim 8, further including the step of:
- incrementing said aligned position; and
- after incrementing said aligned position:
- adding to said aligned set nonmember bitmap segments with maps overlapping said aligned position, and
- removing from said aligned set members of said aligned set that do not contain maps overlapping said aligned position.
- 11. The method of claim 10, wherein:
- said aligned set is associated with an upper bound, said upper bound being the beginning of the next lowest range following said alignment position that is associated with any map from said plurality of bitmaps; and
- the step of adding to said aligned set further includes adding to said aligned set when said aligned position corresponds to said upper bound.
- 12. The method of claim 11, wherein:
- said aligned set is associated with an upper bound, said upper bound being the beginning of the next lowest range following said alignment position that is associated with any map from said plurality of bitmaps; and
- the method further includes the of step of if said aligned set contains no members, then incrementing said aligned position to said upper bound.
- 13. A method of combining a plurality of bitmaps to generate a resulting bitmap representing a SET MINUS operation between said plurality of bitmaps, the method comprising the steps of:
- establishing one bitmap of said plurality of bitmaps as a minuend bitmap;
- establishing another bitmap from said plurality of bitmaps as a subtrahend bitmap;
- finding one or more portions of said minuend bitmap that independently represent a SET MINUS operation between said minuend bitmap and said subtrahend bitmap for one or more ranges corresponding to said one or more portions; and
- establishing said one or more portions as representative of said SET MINUS operation for the one or more ranges corresponding to said one or more portions.
- 14. The method of claim 13, wherein the step of finding includes finding a portion of said minuend bitmap corresponding to a gap in said subtrahend bitmap.
- 15. The method of claim 13, wherein the step of finding includes finding a portion in said minuend bitmap corresponding to a gap in said minuend bitmap.
- 16. The method of claim 13, further including the step establishing as representative of a SET MINUS operation for a particular range a result of a bitwise AND operation between a portion of said minuend corresponding to said particular range and a one's compliment of a portion of said subtrahend corresponding to said particular range.
- 17. A computer-readable medium carrying one or more sequences of one or more instructions for combining a plurality of bitmaps to generate a resulting bitmap that represents the AND operation between said plurality of bitmaps, wherein the execution of the one or more sequences of the one or more instructions causes the one or more processors to perform the steps of:
- A) searching said plurality of bitmaps for a first set of overlapping bitmapsegments, wherein each bitmap segment from said plurality of bitmaps is associated with a range, wherein each range associated with each bitmap segment of said first set of overlapping bitmap segments overlaps with the ranges associated with all other bitmap segments in said first set of overlapping bitmap segments;
- B) generating a first result based on said first set, wherein said first result is representative of a bitwise AND of said plurality of bitmaps for a range shared by all bitmap segments of said first set of overlapping bitmap segments; and
- C) storing said first result in said resulting bitmap.
- 18. The method of claim 17, wherein the step of searching said plurality of bitmaps includes searching at least three bitmaps.
- 19. A computer-readable medium carrying one or more sequences of one or more instructions for combining a plurality of bitmaps to generate a resulting bitmap representing the OR operation between said plurality of bitmaps, wherein the execution of the one or more sequences of the one or more instructions causes the one or more processors to perform the steps of:
- establishing an aligned set of bitmap segments from said plurality of said bitmaps, wherein said aligned set is associated with an alignment position, wherein said alignment position is associated with a range, wherein each member of said aligned set contains a map overlapping said alignment position;
- performing a bitwise OR operation of maps from said members of said aligned set that overlap said alignment position to generate a first result; and
- establishing said first result as the result representing the bitwise OR operation between said plurality of bitmaps for the range corresponding to said aligned position.
- 20. The computer-readable media of claim 19, wherein the step of establishing an aligned set includes establishing an aligned set of bitmap segments from a set of at least three bitmaps.
- 21. The computer-readable media of claim 19, further including sequences of instructions for performing the steps of:
- incrementing said aligned position; and
- after incrementing said aligned position:
- adding to said aligned set nonmember bitmap segments with maps overlapping said aligned position, and
- removing from said aligned set members of said aligned set that do not contain maps overlapping said aligned position.
- 22. The computer-readable media of claim 21, wherein:
- said aligned set is associated with an upper bound, said upper bound being the beginning of the next lowest range following said alignment position that is associated with any map from said plurality of bitmaps; and
- the step of adding to said aligned set further includes adding to said aligned set when said aligned position corresponds to said upper bound.
- 23. The computer-readable media of claim 22, wherein:
- said aligned set is associated with an upper bound, said upper bound being the beginning of the next lowest range following said alignment position that is associated with any map from said plurality of bitmaps; and
- the computer-readable media further includes sequences of instructions for performing the step of if said aligned set contains no members, then incrementing said aligned position to said upper bound.
- 24. The computer-readable medium of claim 19, further including sequences of instructions for performing the steps of:
- D) searching a plurality of bitmaps for a next set of overlapping bitmap segments, wherein each range associated with each bitmap segment of said next set of overlapping bitmap segments overlaps with the ranges associated with all other bitmap segments in said next set of overlapping bitmap segments;
- E) generating a next result based on said next set of overlapping bitmap segments, wherein said next result is representative of a bitwise AND of said plurality of bitmaps for a range shared by all bitmap segments of said next set of overlapping bitmap segments;
- F) storing said next result in said resulting bitmap; and
- G) repeating the steps (D) through (F) until said plurality of bitmaps do not contain another next set of overlapping bitmap segments.
- 25. The computer-readable medium of claim 19, further including sequences of instructions for performing the steps of:
- establishing a tentative point of alignment for said first set of overlapping bitmap segments, said tentative point of alignment corresponding to the beginning of a range associated with a map from a particular bitmap segment from said set of overlapping bitmap segments;
- determining whether each remaining bitmap segment from said first set of overlapping bitmap segments includes a map associated with a range that overlaps said tentative point of alignment; and
- if each remaining bitmap segment from said first set of overlapping bitmap segments includes a map associated with a range that overlaps said tentative point of alignment, then generating a result representative of a bitwise AND between said plurality of bitmaps for a range having a beginning at said tentative point of alignment.
- 26. The computer-readable medium of claim 25, wherein the step of determining whether each remaining bitmap segment from said set of overlapping bitmap segments includes a map further includes inspecting each remaining bitmap segment in an order that corresponds to the sparseness of said remaining bitmap segment.
- 27. The computer-readable medium of claim 25, wherein the step of generating a result representative of a bitwise AND between said plurality of bitmaps for a range having a beginning at said tentative point of alignment further includes:
- finding a minimum map beginning at said tentative point of alignment, wherein each of said set of overlapping bitmap segments contains a map completely overlapping the range associated with said minimum map; and
- generating a result representative of a bitwise AND between said plurality of bitmaps for a range having a beginning at said tentative point of alignment.
- 28. The computer-readable medium of claim 25, further including sequences of instructions for performing the step of establishing the end of the range associated with said minimum map as a next tentative point of alignment.
RELATED APPLICATIONS
The present application is related to: U.S. patent application Ser. No. 08/807,344, entitled "CREATING BITMAPS FROM MULTI-LEVEL IDENTIFIERS" now pending, filed by Cetin Ozbutun, Michael Depledge, Hakan Jakobsson, Mark Kremer, Jeffrey I. Cohen, Quoc Tai Tran, and Alexander C. Ho on the equal day herewith, the contents of which are incorporated herein by reference.
U.S. patent application Ser. No. 08/808,584, entitled "BITMAP SEGMENTATION" now pending, filed by Cetin Ozbutun, Jeffrey I. Cohen, Hakan Jakobsson, Mark Kremer, Michael Depledge, Quoc Tai Tran, Alexander C. Ho, and Julian Hyde, on the equal day herewith, the contents of which are incorporated herein by reference.
U.S. patent application Ser. No. 08/752,128, entitled "METHOD AND APPARATUS FOR PROCESSING COUNT STATEMENTS IN A DATABASE SYSTEM" now U.S. Pat. No. 5,819,256, filed by Cetin Ozbutun, Michael Depledge, Hakan Jakobsson, and Jeffrey I. Cohen, on Nov. 20, 1996, the contents of which are incorporated herein by reference.
U.S. patent application Ser. No. 08/808,097, entitled "GROUP BY AND DISTINCT SORT ELIMINATION USING COST-BASED OPTIMIZATION" U.S. Pat. No. 5,822,778, filed by Jeffrey Ira Cohen, Cetin Ozbutun, Michael Depledge, and Hakan Jakobsson, on the equal day herewith, the contents of which are incorporated herein by reference.
U.S. patent application Ser. No. 08/808,096, entitled "METHOD AND APPARATUS FOR USING INCOMPATIBLE TYPES OF INDEXES TO PROCESS A SINGLE QUERY" U.S. Pat. No. 5,903,888, filed by Jeffrey Ira Cohen, Cetin Ozbutun, Hakan Jakobsson, and Michael Depledge, on the equal day herewith, the contents of which are incorporated herein by reference.
U.S. patent application Ser. No. 08/808,094, entitled "INDEX SELECTION FOR AN INDEX ACCESS PATH" now pending, filed by Hakan Jakobsson, Michael Depledge, Cetin Ozbutun, and Jeffrey I. Cohen, on the equal day herewith, the contents of which are incorporated herein by reference.
U.S. patent application Ser. No. 08/807,451, entitled "BITMAPPED INDEXING WITH HIGH GRANULARITY LOCKING" U.S. Pat. No. 5,899,988, filed by Michael Depledge, Jeffrey I. Cohen, Hakan Jakobsson, Mark Kremer, Cetin Ozbutun, Quoc Tai Tran, and Alexander C. Ho, on the equal day herewith, the contents of which are incorporated herein by reference.
U.S. patent application Ser. No. 08/808,585, entitled "UPDATING BITMAPPED INDEXES" U.S. Pat. No. 5,884,307, filed by Michael Depledge, Hakan Jakobsson, Cetin Ozbutun, Jeffrey I. Cohen, and Quoc Tai Tran, on the equal day herewith, the contents of which are incorporated herein by reference.
U.S. patent application Ser. No. 08/808,560, entitled "BIT INDEX COMPRESSION" U.S. Pat. No. 5,907,297, filed by Jeffrey I. Cohen, Michael Depledge, Hakan Jakobsson, Mark Kremer, Cetin Ozbutin, and Quoc Tai Tran, on the equal day herewith, the contents of which are incorporated herein by reference.
U.S. patent application Ser. No. 08/808,586, entitled "COMBINING BITMAPS WITHIN A MEMORY LIMIT" now pending, filed by Cetin Ozbutun, Jeffrey I. Cohen, Michael Depledge, Julian Hyde, Hakan Jakobsson, Mark Kremer, and Quoc Tai Tran, on the equal day herewith, the contents of which are incorporated herein by reference.
US Referenced Citations (9)
Foreign Referenced Citations (1)
Number |
Date |
Country |
0772139 A2 |
May 1997 |
EPX |