PREVENTING STALENESS IN QUERY RESULTS WHEN USING ASYNCHRONOUSLY UPDATED INDEXES
First Claim
1. A method, the method comprising:
- providing, by one or more processors, an asynchronously updated index for a main dataset in a database system;
providing, by one or more processors, a time-sequenced log data of modifications to the main dataset, wherein the log data of modifications includes at least one of (i) an addition, (ii) an update and (iii) a deletion of affected entries of the main dataset after a cutoff time of a last asynchronous index update;
receiving, by one or more processors, a query of the main dataset;
joining, by one or more processors, the main dataset with the time-sequenced log data resulting in a first intermediate result comprising one or more entry of the main dataset after the cutoff time, wherein the one or more entry is at least one of (i) inserted, (ii) updated, and (iii) deleted;
processing, the one or more processors, the query by keeping the one or more entries satisfying the query by emulating a function of the asynchronously updated index access resulting in a second intermediate result;
filtering, by one or more processors, at least one of (i) an out updated dataset entry and (ii) a deleted dataset entry from the asynchronously updated index using the time-sequenced log data building a lookup table;
processing, by one or more processors, the query against the base table using the lookup table resulting in a third intermediate result; and
building, by one or more processors, a union of the second intermediate result and the third intermediate result defining a final result of the query.
1 Assignment
0 Petitions
Accused Products
Abstract
A method, computer program product, and computer system for optimizing query processing is provided. An asynchronously updated index is provided for a main dataset. A time-sequences log of data modifications to the main dataset is provided. A query of the main dataset is received. The main dataset is joined with the time-sequenced log data resulting in a first intermediate result. The query is processed by keeping one or more entries satisfying the query by emulating a function of the asynchronously updated index resulting in a second intermediate result. Updated, deleted dataset entries are deleted from the asynchronously updated index. The query is processed resulting in a third intermediate result. A union of the second intermediate result and third intermediate result is built defining a final result.
7 Citations
20 Claims
-
1. A method, the method comprising:
-
providing, by one or more processors, an asynchronously updated index for a main dataset in a database system; providing, by one or more processors, a time-sequenced log data of modifications to the main dataset, wherein the log data of modifications includes at least one of (i) an addition, (ii) an update and (iii) a deletion of affected entries of the main dataset after a cutoff time of a last asynchronous index update; receiving, by one or more processors, a query of the main dataset; joining, by one or more processors, the main dataset with the time-sequenced log data resulting in a first intermediate result comprising one or more entry of the main dataset after the cutoff time, wherein the one or more entry is at least one of (i) inserted, (ii) updated, and (iii) deleted; processing, the one or more processors, the query by keeping the one or more entries satisfying the query by emulating a function of the asynchronously updated index access resulting in a second intermediate result; filtering, by one or more processors, at least one of (i) an out updated dataset entry and (ii) a deleted dataset entry from the asynchronously updated index using the time-sequenced log data building a lookup table; processing, by one or more processors, the query against the base table using the lookup table resulting in a third intermediate result; and building, by one or more processors, a union of the second intermediate result and the third intermediate result defining a final result of the query. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer program product, the computer program product comprising:
-
a computer readable storage medium and program instructions stored on the computer readable storage medium, the program instructions comprising; program instructions to provide an asynchronously updated index for a main dataset in a database system; program instructions to provide a time-sequenced log data of modifications to the main dataset, wherein the log data of modifications includes at least one of (i) an addition, (ii) an update and (iii) a deletion of affected entries of the main dataset after a cutoff time of a last asynchronous index update; program instructions to receive a query of the main dataset; program instructions to join the main dataset with the time-sequenced log data resulting in a first intermediate result comprising one or more entry of the main dataset after the cutoff time, wherein the one or more entry is at least one of (i) inserted, (ii) updated, and (iii) deleted; program instructions to program instructions to process the query by keeping the one or more entries satisfying the query by emulating a function of the asynchronously updated index access resulting in a second intermediate result; program instructions to filter at least one of (i) an out updated dataset entry and (ii) a deleted dataset entry from the asynchronously updated index using the time-sequenced log data building a lookup table; program instructions to process the query against the base table using the lookup table resulting in a third intermediate result; and program instructions to build a union of the second intermediate result and the third intermediate result defining a final result of the query. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A computer system, the computer system comprising:
-
one or more computer processors; one or more computer readable storage media; program instructions stored on the computer readable storage media for execution by at least one of the one or more processors, the program instructions comprising; program instructions to provide an asynchronously updated index for a main dataset in a database system; program instructions to provide a time-sequenced log data of modifications to the main dataset, wherein the log data of modifications includes at least one of (i) an addition, (ii) an update and (iii) a deletion of affected entries of the main dataset after a cutoff time of a last asynchronous index update; program instructions to receive a query of the main dataset; program instructions to join the main dataset with the time-sequenced log data resulting in a first intermediate result comprising one or more entry of the main dataset after the cutoff time, wherein the one or more entry is at least one of (i) inserted, (ii) updated, and (iii) deleted; program instructions to program instructions to process the query by keeping the one or more entries satisfying the query by emulating a function of the asynchronously updated index access resulting in a second intermediate result; program instructions to filter at least one of (i) an out updated dataset entry and (ii) a deleted dataset entry from the asynchronously updated index using the time-sequenced log data building a lookup table; program instructions to process the query against the base table using the lookup table resulting in a third intermediate result; and program instructions to build a union of the second intermediate result and the third intermediate result defining a final result of the query. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification