Mechanism for efficient maintenance of XML index structures in a database system
First Claim
1. A method comprising:
- when changes are made to indexed information, storing one or more indications that an index has to be changed, wherein the step of storing one or more indications is performed in a first operation that is synchronous relative to the changes, wherein the index is not changed during said first operation;
in response to detecting that certain conditions have been satisfied, performing a second operation that updates the index and removes the one or more indications that the index has to be changed, wherein the second operation is performed asynchronously relative to the changes made to the indexed information; and
after the first operation has been completed and before the second operation is performed;
receiving a request to access the indexed information; and
in response to receiving the request;
obtaining accessed information by using the index to access the indexed information even though the changes are not yet reflected in the index;
reading data to determine whether the index is maintained in asynchronous stale mode or in asynchronous current mode;
if the index is maintained in asynchronous stale mode, then using the index to return the accessed information; and
if the index is maintained in asynchronous current mode, then;
determining, from the one or more indications, whether any portion of the accessed information has been deleted or updated,if a portion of the accessed information has been deleted or updated, responding to the request after removing said portion of the accessed information from the accessed information; and
examining the one or more indications for inserted and updated information that relates to the request.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and apparatus for efficiently maintaining XML index structures in a database system is provided. Instead of immediately synchronizing the XML index structures for every change submitted to the database, the changes are stored in a PENDING table. The XML index structures are periodically synchronized, based on certain criteria or at a user'"'"'s discretion. Between synchronizations, the XML index structures may be in stale mode or current mode. If in stale mode, a request to access indexed information will use the XML index structures to find the desired indexed information without checking the PENDING table. If in current mode, a request to access indexed information will search the XML index structures and also check the PENDING table to determine 1) whether the indexed information has been updated or deleted, and 2) whether information relevant to the request has been inserted or updated.
-
Citations
20 Claims
-
1. A method comprising:
-
when changes are made to indexed information, storing one or more indications that an index has to be changed, wherein the step of storing one or more indications is performed in a first operation that is synchronous relative to the changes, wherein the index is not changed during said first operation; in response to detecting that certain conditions have been satisfied, performing a second operation that updates the index and removes the one or more indications that the index has to be changed, wherein the second operation is performed asynchronously relative to the changes made to the indexed information; and after the first operation has been completed and before the second operation is performed; receiving a request to access the indexed information; and in response to receiving the request; obtaining accessed information by using the index to access the indexed information even though the changes are not yet reflected in the index; reading data to determine whether the index is maintained in asynchronous stale mode or in asynchronous current mode; if the index is maintained in asynchronous stale mode, then using the index to return the accessed information; and if the index is maintained in asynchronous current mode, then; determining, from the one or more indications, whether any portion of the accessed information has been deleted or updated, if a portion of the accessed information has been deleted or updated, responding to the request after removing said portion of the accessed information from the accessed information; and examining the one or more indications for inserted and updated information that relates to the request. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. One or more non-transitory machine-readable media storing instructions which, when executed by one or more processors, cause:
-
when changes are made to indexed information, storing one or more indications that an index has to be changed, wherein the step of storing one or more indications is performed in a first operation that is synchronous relative to the changes, wherein the index is not changed during said first operation; in response to detecting that certain conditions have been satisfied, performing a second operation that updates the index and removes the one or more indications that the index has to be changed, wherein the second operation is performed asynchronously relative to the changes made to the indexed information; and after the first operation has been completed and before the second operation is performed; receiving a request to access the indexed information; and
in response to receiving the request;obtaining accessed information by using the index to access the indexed information even though the changes are not yet reflected in the index; reading data to determine whether the index is maintained in asynchronous stale mode or in asynchronous current mode; if the index is maintained in asynchronous stale mode, then using the index to return the accessed information; and if the index is maintained in asynchronous current mode, then; determining, from the one or more indications, whether any portion of the accessed information has been deleted or updated, if a portion of the accessed information has been deleted or updated, responding to the request after removing said portion of the accessed information from the accessed information; and examining the one or more indications for inserted and updated information that relates to the request. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
-
Specification