Methods and systems for fast set-membership tests using one or more processors that support single instruction multiple data instructions
First Claim
Patent Images
1. A method comprising:
- receiving a query that references a database table, wherein;
the query has a predicate that specifies a search condition on a particular column of the database table;
the particular column of the database table has been encoded based on a dictionary;
copying a bit-vector into a first subregister and a second subregister, wherein the first subregister and the second subregister are subregisters in a single SIMD register;
wherein the bit-vector that is copied into both the first subregister and the second subregister indicates which values, in the dictionary, satisfy the search condition;
performing a shift operation that;
shifts bits in the first subregister by a first value that corresponds with a first column value in a first row of the particular column in the database table, andshifts bits in the second subregister by a second value that corresponds with a second column value in a second row of the particular column in the database table;
wherein the first value by which the bits in the first subregister are shifted is different than the second value by which the bits in the second subregister are shifted;
after performing the shift operation;
determining whether the first column value satisfies the search condition based on a resulting shifted first bit in the single SIMD register at a particular position in the first subregister;
determining whether the second column value satisfies the search condition based on a resulting shifted second bit in the single SIMD register at the particular position in the second subregister; and
providing results to the query based on whether the first column value satisfies the search condition and whether the second column value satisfies the search condition.
1 Assignment
0 Petitions
Accused Products
Abstract
Methods and apparatuses for determining set-membership using Single Instruction Multiple Data (“SIMD”) architecture are presented herein. Specifically, methods and apparatuses are discussed for determining, in parallel, whether multiple values in a first set of values are members of a second set of values. Many of the methods and systems discussed herein are applied to determining whether one or more rows in a dictionary-encoded column of a database table satisfy one or more conditions based on the dictionary-encoded column. However, the methods and systems discussed herein may apply to many applications executed on a SIMD processor using set-membership tests.
-
Citations
18 Claims
-
1. A method comprising:
-
receiving a query that references a database table, wherein; the query has a predicate that specifies a search condition on a particular column of the database table; the particular column of the database table has been encoded based on a dictionary; copying a bit-vector into a first subregister and a second subregister, wherein the first subregister and the second subregister are subregisters in a single SIMD register; wherein the bit-vector that is copied into both the first subregister and the second subregister indicates which values, in the dictionary, satisfy the search condition; performing a shift operation that; shifts bits in the first subregister by a first value that corresponds with a first column value in a first row of the particular column in the database table, and shifts bits in the second subregister by a second value that corresponds with a second column value in a second row of the particular column in the database table; wherein the first value by which the bits in the first subregister are shifted is different than the second value by which the bits in the second subregister are shifted; after performing the shift operation; determining whether the first column value satisfies the search condition based on a resulting shifted first bit in the single SIMD register at a particular position in the first subregister; determining whether the second column value satisfies the search condition based on a resulting shifted second bit in the single SIMD register at the particular position in the second subregister; and providing results to the query based on whether the first column value satisfies the search condition and whether the second column value satisfies the search condition. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A non-transitory computer-readable medium storing one or more instructions which, when executed by one or more processors, cause the one or more processors to perform steps comprising:
-
receiving a query that references a database table, wherein; the query has a predicate that specifies a search condition on a particular column of the database table; the particular column of the database table has been encoded based on a dictionary; copying a bit-vector into a first subregister and a second subregister, wherein the first subregister and the second subregister are subregisters in a single SIMD register; wherein the bit-vector that is copied into both the first subregister and the second subregister indicates which values, in the dictionary, satisfy the search condition; performing a shift operation that; shifts bits in the first subregister by a first value that corresponds with a first column value in a first row of the particular column in the database table, and shifts bits in the second subregister by a second value that corresponds with a second column value in a second row of the particular column in the database table; wherein the first value by which the bits in the first subregister are shifted is different than the second value by which the bits in the second subregister are shifted; after performing the shift operation; determining whether the first column value satisfies the search condition based on a resulting shifted first bit in the single SIMD register at a particular position in the first subregister; determining whether the second column value satisfies the search condition based on a resulting shifted second bit in the single SIMD register at the particular position in the second subregister; and providing results to the query based on whether the first column value satisfies the search condition and whether the second column value satisfies the search condition. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A hardware processor configured to:
-
receive a query that references a database table, wherein; the query has a predicate that specifies a search condition on a particular column of the database table; the particular column of the database table has been encoded based on a dictionary; copy a bit-vector into a first subregister and a second subregister, wherein the first subregister and the second subregister are subregisters in a single SIMD register; wherein the bit-vector that is copied into both the first subregister and the second subregister indicates which values, in the dictionary, satisfy the search condition; perform a shift operation that; shifts bits in the first subregister by a first value that corresponds with a first column value in a first row of the particular column in the database table, and shifts bits in the second subregister by a second value that corresponds with a second column value in a second row of the particular column in the database table; wherein the first value by which the bits in the first subregister are shifted is different than the second value by which the bits in the second subregister are shifted; after performing the shift operation; determine whether the first column value satisfies the search condition based on a resulting shifted first bit in the single SIMD register at a particular position in the first subregister; determine whether the second column value satisfies the search condition based on a resulting shifted second bit in the single SIMD register at the particular position in the second subregister; and providing results to the query based on whether the first column value satisfies the search condition and whether the second column value satisfies the search condition. - View Dependent Claims (14, 15, 16, 17, 18)
-
Specification