APPARATUS, SYSTEM, AND METHOD FOR IMPROVING UPDATE PERFORMANCE FOR INDEXING USING DELTA KEY UPDATES
First Claim
Patent Images
1. A system for updating database indexes, the system comprising:
- a database;
a database management system (DBMS) for managing the database, the DBMS comprising an index manager configured to perform operations comprising;
identifying at least one index comprised of index keys, the index keys defined by an index key definition and corresponding to nodes of an indexable entity;
processing an old indexable entity in response to an update command;
generating a set of delete index keys, the delete index keys corresponding to nodes of the old indexable entity satisfying the index key definition of the index;
processing a replacement indexable entity wherein the replacement indexable entity is intended to replace the old indexable entity in response to an update command;
generating a set of insert index keys, the insert index keys corresponding to nodes of the replacement indexable entity satisfying the index key definition of the index;
inserting into the index only the insert index keys that do not match one of the delete index keys; and
deleting from the index only the delete index keys that do not match one of the insert index keys.
1 Assignment
0 Petitions
Accused Products
Abstract
An apparatus, system, and method are disclosed for updating database indexes on complex data types. Instead of deleting all the index keys for an old indexable entity, only the old index keys which are not in the set of new index keys associated with a replacement indexable entity will be deleted. In addition, only new index keys which are not in the set of old index keys are inserted into the index. In this manner, performance is greatly improved by elimination unnecessary deletions and insertions to an index.
-
Citations
20 Claims
-
1. A system for updating database indexes, the system comprising:
-
a database; a database management system (DBMS) for managing the database, the DBMS comprising an index manager configured to perform operations comprising; identifying at least one index comprised of index keys, the index keys defined by an index key definition and corresponding to nodes of an indexable entity; processing an old indexable entity in response to an update command; generating a set of delete index keys, the delete index keys corresponding to nodes of the old indexable entity satisfying the index key definition of the index; processing a replacement indexable entity wherein the replacement indexable entity is intended to replace the old indexable entity in response to an update command; generating a set of insert index keys, the insert index keys corresponding to nodes of the replacement indexable entity satisfying the index key definition of the index; inserting into the index only the insert index keys that do not match one of the delete index keys; and deleting from the index only the delete index keys that do not match one of the insert index keys. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A computer program product comprising a computer readable medium having computer usable program code stored on a tangible medium and executable on a processor to perform operations for updating database indexes, the operations of the computer program product comprising:
-
identifying at least one index comprised of index keys, the index keys defined by an index key definition and corresponding to nodes of an indexable entity in a database; processing an old indexable entity in response to an update command; generating a delete index key for each node of the old indexable entity that satisfies the index key definition, each delete index key corresponding to an index key stored in the at least one index; processing a replacement indexable entity, the replacement indexable entity configured to replace the old indexable entity in response to an update command; generating an insert index key for each node of the replacement indexable entity satisfying the index key definition; sorting the delete index keys and insert index keys in a list to define index pairs and index singles based on one or more index key parts, an index pair comprising a delete index key and a matching insert index key, an index single comprising one of a single insert index key and a single delete index key; deleting each index key from the index which corresponds to a single delete index key in the list; and inserting each single insert index key into the index. - View Dependent Claims (14, 15, 16, 17, 18, 20)
-
-
19. A computer program product comprising a computer readable medium having computer usable program code stored on a tangible medium and executable on a processor to perform operations for updating database indexes, the operations of the computer program product comprising:
-
identifying at least one index comprised of index keys, the index keys defined by an index key definition and corresponding to nodes of an indexable entity in a database; processing an old indexable entity in response to an update command; generating a delete index key for each node of the old indexable entity that satisfies the index key definition of the index, each delete index key corresponding to an existing index key stored in the at least one index; storing the generated delete index keys in a buffer; processing a replacement indexable entity wherein the replacement indexable entity is intended to replace the old indexable entity in response to an update command; generating an insert index key for each node of the replacement indexable entity satisfying the index key definition of the index; storing each insert index key in the buffer in response to determining that the insert index key does not match any of the delete index keys stored in the buffer; marking each delete index key that matches one of the insert index keys with an identifier; deleting from the index only the index keys corresponding to delete index keys in the buffer that are not marked with the identifier; and inserting into the index each insert index key stored in the buffer.
-
Specification