Supporting cursor snapshot semantics
First Claim
Patent Images
1. A method for implementation by one or more hardware data processors forming part of at least one computing device, the method comprising:
- opening a cursor defining a result set for a transaction on a database, the result set comprising a set of rows in a table of the database that the cursor affects, the transaction having an associated transaction identifier and comprising one or more statements, each statement involving at least one row of the set of rows;
assigning a temporary timestamp to each row in the set of rows, the assigning of the temporary timestamp comprising identifying, for each row of the set of rows, a statement sequence number assigned to a statement of the one or more statements that involves that row and the associated transaction identifier for the transaction comprising the statement;
monitoring a plurality of active cursors, the plurality of active cursors comprising the cursor, the monitoring comprising determining whether a given row of the table is affected by any active cursor; and
preventing a final timestamp to be associated with the given row until there are no remaining active cursors for the given row, the preventing comprising determining that none of the plurality of active cursors relates to any transaction identifiers or statement sequence numbers of the temporary timestamp for the given row.
2 Assignments
0 Petitions
Accused Products
Abstract
A database upon opening each of at least one cursor for a transaction, assigns each statement forming part of a transaction a statement sequence number (SSN) involving at least one row of the database. Thereafter, temporary timestamps are assigned to the at least one row using a transaction identifier and the corresponding SSN. Further, active cursors are monitored such that a final timestamp is prevented from being associated with each row until it has no remaining cursors. Related apparatus, systems, techniques and articles are also described.
115 Citations
18 Claims
-
1. A method for implementation by one or more hardware data processors forming part of at least one computing device, the method comprising:
-
opening a cursor defining a result set for a transaction on a database, the result set comprising a set of rows in a table of the database that the cursor affects, the transaction having an associated transaction identifier and comprising one or more statements, each statement involving at least one row of the set of rows; assigning a temporary timestamp to each row in the set of rows, the assigning of the temporary timestamp comprising identifying, for each row of the set of rows, a statement sequence number assigned to a statement of the one or more statements that involves that row and the associated transaction identifier for the transaction comprising the statement; monitoring a plurality of active cursors, the plurality of active cursors comprising the cursor, the monitoring comprising determining whether a given row of the table is affected by any active cursor; and preventing a final timestamp to be associated with the given row until there are no remaining active cursors for the given row, the preventing comprising determining that none of the plurality of active cursors relates to any transaction identifiers or statement sequence numbers of the temporary timestamp for the given row. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A non-transitory computer program product storing instructions which, when executed by at least one hardware data processor forming part of at least one computing system, result in operations comprising:
-
opening a cursor defining a result set for a transaction on a database, the result set comprising a set of rows in a table of the database that the cursor affects, the transaction having an associated transaction identifier and comprising one or more statements, each statement involving at least one row of the set of rows; assigning a temporary timestamp to each row in the set of rows, the assigning of the temporary timestamp comprising identifying, for each row of the set of rows, a statement sequence number assigned to a statement of the one or more statements that involves that row and the associated transaction identifier for the transaction comprising the statement; monitoring a plurality of active cursors, the plurality of active cursors comprising the cursor, the monitoring comprising determining whether a given row of the table is affected by any active cursor; and preventing a final timestamp to be associated with the given row until there are no remaining active cursors for the given row, the preventing comprising determining that none of the plurality of active cursors relates to any transaction identifiers or statement sequence numbers of the temporary timestamp for the given row. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A system comprising:
an in-memory database comprising; at least one hardware data processor; and memory storing instructions which, when executed by the at least one hardware data processor, result in operations comprising; opening a cursor defining a result set for a transaction on the in-memory database, the result set comprising a set of rows in a table of the database that the cursor affects, the transaction having an associated transaction identifier and comprising one or more statements, each statement involving at least one row of the set of rows; assigning a temporary timestamp to each row in the set of rows, the assigning of the temporary timestamp comprising identifying, for each row of the set of rows, a statement sequence number assigned to a statement of the one or more statements that involves that row and the associated transaction identifier for the transaction comprising the statement; monitoring a plurality of active cursors, the plurality of active cursors comprising the cursor, the monitoring comprising determining whether a given row of the table is affected by any active cursor; and preventing a final timestamp to be associated with the given row until there are no remaining active cursors for the given row, the preventing comprising determining that none of the plurality of active cursors relates to any transaction identifiers or statement sequence numbers of the temporary timestamp for the given row. - View Dependent Claims (16, 17, 18)
Specification