US 12,242,481 B1
Hardware optimized string table for accelerated relational database queries
James Kearney, Bolton, MA (US); and Weiwei Gong, Belmont, CA (US)
Assigned to Oracle International Corporation, Redwood Shores, CA (US)
Filed by Oracle International Corporation, Redwood Shores, CA (US)
Filed on Jan. 25, 2024, as Appl. No. 18/423,196.
Int. Cl. G06F 16/00 (2019.01); G06F 9/38 (2018.01); G06F 16/2453 (2019.01); G06F 16/2455 (2019.01); G06F 16/27 (2019.01)
CPC G06F 16/2455 (2019.01) [G06F 9/3887 (2013.01); G06F 16/24542 (2019.01); G06F 16/27 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A method comprising, concurrently for each thread of a plurality of computational threads:
retrieving a lookup key for a query against a dynamic string table, wherein the lookup key is associated with a key length and a key hash;
in response to determining that the key length exceeds a maximum inline key size, configuring a formatted lookup key as out-of-line and including a segment of the key hash in the formatted lookup key;
in response to determining that the key length does not exceed the maximum inline key size, configuring the formatted lookup key as in-line and including the key length and the lookup key in the formatted lookup key;
replicating, into a first plurality of single instruction, multiple data (SIMD) lanes, the formatted lookup key;
writing a candidate bucket from the dynamic string table into a second plurality of SIMD lanes, wherein the candidate bucket is selected from the dynamic string table based on the key hash;
performing a SIMD compare of the first plurality of SIMD lanes and the second plurality of SIMD lanes; and
in response to determining, based on the SIMD compare, that the lookup key is present in the candidate bucket, returning an associated code as a result of the query.