×

Preventing staleness in query results when using asynchronously updated indexes

  • US 10,614,070 B2
  • Filed: 10/27/2015
  • Issued: 04/07/2020
  • Est. Priority Date: 10/27/2015
  • Status: Active Grant
First Claim
Patent Images

1. A computer program product embodied in a computer readable storage medium, wherein the computer readable storage medium is not a transitory signal, the computer program product comprising:

  • program instructions that are stored on the computer readable storage medium are executed by a computer system to perform a method comprising;

    receiving an asynchronously updated index corresponding to a main dataset in a database system;

    receiving time-sequenced log data of modifications made to the main dataset after a cutoff time of a last asynchronous index update, wherein the time-sequenced log data is read once by the database system for joining the main dataset with the time-sequenced log data and filtering out updated dataset entries and deleted dataset entries from the asynchronously updated index;

    receiving, from an end user, a proximity-based query directed to the main dataset;

    joining the main dataset with the time-sequenced log data resulting in a first intermediate result comprising a first one or more entries of the main dataset made after the cutoff time;

    processing the proximity-based query to determine a second one or more entries satisfying the proximity-based query by emulating a function of the last asynchronous index update resulting in a second intermediate result, wherein the second intermediate result includes updated and deleted entries of a base table that are retrieved by the proximity-based query using an outdated asynchronously updated index, wherein the processing the proximity-based query further comprises receiving a staleness acceptability criterion; and

    determining, based at least in part on the staleness acceptability criterion, that one or more query results are acceptable;

    filtering out the updated dataset entries from the asynchronously updated index using the time-sequenced log data to generate a lookup table as index table;

    processing the proximity-based query against the main dataset using the lookup table resulting in a third intermediate result; and

    building a union of the second intermediate result and the third intermediate result, to generate a final result of the proximity-based query.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×