Generating continuous query notifications
First Claim
1. A method for determining whether a change affects results produced by queries that belong to a set of registered queries, the method comprising:
- for a table referenced in a query from the set of registered queries, generating a filter condition based, at least in part, on a predicate of the query;
determining whether the filter condition is satisfied by either (a) a before image of a row of the table, wherein the before image reflects the state of the row before the row was modified by a transaction, or (b) an after image of the row, wherein the after image of the row reflects the state of the row after the row was modified by the transaction;
in response to determining that the filter condition is satisfied by either the before image or the after image, adding the query to a first set of queries, from the set of registered queries, whose result sets may have been affected by the transaction;
wherein at least one query in the set of registered queries is not added to the first set of queries because a condition associated with the at least one query is not satisfied by either the before image or the after image;
from among the first set of queries, determining a second set of queries that have result sets that were actually affected by the transaction;
wherein one or more queries in the first set of queries are not in the second set of queries because the result sets of the one or more queries were not actually affected by the transaction; and
sending notifications based on the second set of queries;
wherein the method is performed by one or more computing devices.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques are described to allow a query to be registered as a persistent stored entity within the database, and to generate notifications as and when the query result changes continuously as long as the query continues to be registered with the database. According to one aspect, for a table referenced in a query, a filter condition is generated based, at least in part, on a predicate of the query. Then, the database server determines whether the filter condition is satisfied by either a before image of a row, or an after image of the row, that was modified by a transaction. If the filter condition is satisfied by either the before image or the after image, then the query is added to a first set of queries whose result sets may have been affected by the transaction. From among the first set of queries, a second set of queries that have result sets that were actually affected by the transaction is determined. Notifications are then sent based on the second set of queries.
24 Citations
28 Claims
-
1. A method for determining whether a change affects results produced by queries that belong to a set of registered queries, the method comprising:
-
for a table referenced in a query from the set of registered queries, generating a filter condition based, at least in part, on a predicate of the query; determining whether the filter condition is satisfied by either (a) a before image of a row of the table, wherein the before image reflects the state of the row before the row was modified by a transaction, or (b) an after image of the row, wherein the after image of the row reflects the state of the row after the row was modified by the transaction; in response to determining that the filter condition is satisfied by either the before image or the after image, adding the query to a first set of queries, from the set of registered queries, whose result sets may have been affected by the transaction; wherein at least one query in the set of registered queries is not added to the first set of queries because a condition associated with the at least one query is not satisfied by either the before image or the after image; from among the first set of queries, determining a second set of queries that have result sets that were actually affected by the transaction; wherein one or more queries in the first set of queries are not in the second set of queries because the result sets of the one or more queries were not actually affected by the transaction; and sending notifications based on the second set of queries; wherein the method is performed by one or more computing devices. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28)
-
Specification