US 12,229,119 B2
Multiple index scans
Colm McHugh, Dublin (IE); Rama K. Korlapati, El Segundo, CA (US); and Yi Xia, Los Angeles, CA (US)
Assigned to Salesforce, Inc., San Francisco, CA (US)
Filed by salesforce.com, inc., San Francisco, CA (US)
Filed on Dec. 29, 2021, as Appl. No. 17/646,477.
Prior Publication US 2023/0205760 A1, Jun. 29, 2023
Int. Cl. G06F 16/23 (2019.01)
CPC G06F 16/2379 (2019.01) 20 Claims
OG exemplary drawing
 
1. A method, comprising:
a computer system storing:
a database table comprising a plurality of fields; and
a plurality of indexes corresponding to at least two of the plurality of fields;
the computer system receiving a request to access a set of records included in the database table, wherein the request specifies a Boolean expression that affects a selection of records from the database table and that comprises a plurality of clauses, at least two of which are joined by an AND operation; and
the computer system accessing the set of records, wherein the accessing includes:
for a given one of the at least two clauses that are joined by the AND operation, performing an index scan on one of the plurality of indexes that corresponds to the given clause to identify records that satisfy the given clause;
updating a hash table based on the identified records, wherein the hash table stores count values for primary keys identified during index scans associated with the at least two clauses;
identifying the requested set of records based on the count values of the hash table; and
the computer system returning the requested set of records to an issuer of the request.