Incremental indexing of a database table in a database
First Claim
1. A computer-implemented method of indexing a plurality of entries in a database stored on a computer readable storage medium that contains a database table having a base index, the method comprising:
- inserting a plurality of rows in the database table;
generating a plurality of index increments in response to insertion of the rows in the database table, the index increments comprising a subset of database index entries, each database index entry formatted to match a database index entry in a corresponding base index, wherein a number of database index entries in the index increments is less than a number of database index entries in the base index;
adding a plurality of database index entries associated with the inserted rows to the index increments;
generating an additional index increment from the plurality of index increments in response to an index increment having a memory size that approaches a memory size of volatile cache available to a database generating the additional index increment;
satisfying a database request by performing a parallel index scan of the base index and the index increments, the parallel index scan scanning the base index and the index increments concurrently, the database request received subsequent to insertion of the row; and
merging the index increments with the base index in response to a query response time for the database exceeding a first predefined criterion defined by an administrator of the database table and a number of index entries exceeding a second predefined criterion upon completion of the step of adding the plurality of index entries to the index increments, such that database index entries added to the base index satisfy a predefined ordering of the base index.
1 Assignment
0 Petitions
Accused Products
Abstract
The present system indexes a plurality of entries in a database that contains a database table having a base index. As a recent row is inserted in the database table, an index increment is generated based on the inserted row. Preferably, the index increment is smaller in size than the base index because it is recently generated. The smaller size of the index increment facilitates the management of the index increment. An index entry associated with the inserted row is added to the index increment, and the index increment is merged with the base index.
-
Citations
9 Claims
-
1. A computer-implemented method of indexing a plurality of entries in a database stored on a computer readable storage medium that contains a database table having a base index, the method comprising:
-
inserting a plurality of rows in the database table; generating a plurality of index increments in response to insertion of the rows in the database table, the index increments comprising a subset of database index entries, each database index entry formatted to match a database index entry in a corresponding base index, wherein a number of database index entries in the index increments is less than a number of database index entries in the base index; adding a plurality of database index entries associated with the inserted rows to the index increments; generating an additional index increment from the plurality of index increments in response to an index increment having a memory size that approaches a memory size of volatile cache available to a database generating the additional index increment; satisfying a database request by performing a parallel index scan of the base index and the index increments, the parallel index scan scanning the base index and the index increments concurrently, the database request received subsequent to insertion of the row; and merging the index increments with the base index in response to a query response time for the database exceeding a first predefined criterion defined by an administrator of the database table and a number of index entries exceeding a second predefined criterion upon completion of the step of adding the plurality of index entries to the index increments, such that database index entries added to the base index satisfy a predefined ordering of the base index. - View Dependent Claims (2, 3, 4)
-
-
5. A database management system for indexing a plurality of entries in a database stored on a computer readable storage medium that contains a database table having a base index, the system comprising:
-
a computer; a computer readable storage medium for storing data, in communication with the computer; a memory in communication with the computer, the memory comprising; the database table storing a plurality of newly inserted rows; an index increment building module for generating a plurality of index increments in response to insertion of the rows in the database table, the index increments comprising a subset of database index entries, each database index entry formatted to match a database index entry in a corresponding base index, wherein a memory size of the base index is greater than a memory size of volatile cache available to the database generating the index increments, an index increment based on the inserted rows, wherein the index increments are smaller than the base index; the index increment building module further adding a plurality of database index entries associated with the inserted rows to the index increments; the index increment building module further generating an additional index increment from the plurality of index increments in response to an index increment having a memory size that approaches the memory size of volatile cache available to the database generating the index increment; satisfying a database request by performing a parallel index scan of the base index and the index increments, the parallel index scan scanning the base index and the index increments concurrently, the database request received subsequent to insertion of the row; and an index increment merging module for merging the index increments with the base index in response to a query response time for the database exceeding a first predefined criterion defined by an administrator of the database table and a number of index entries exceeding a second predefined criterion upon completion of the step of adding the plurality of index entries to the index increments, such that database index entries added to the base index satisfy a predefined ordering of the base index. - View Dependent Claims (6, 7)
-
-
8. A computer program product stored in a computer readable storage medium, the computer program product having a plurality of program codes for indexing a plurality of entries in a database that contains a database table having a base index, the computer program product comprising:
-
the database table storing a plurality of newly inserted rows; a program code for generating a plurality of index increments, in response to insertion of the rows in the database table, the index increments comprising a subset of database index entries, each database index entry formatted to match a database index entry in a corresponding base index, wherein a memory size of the base index is greater than a memory size of volatile cache available to the database generating the index increments; a program code for adding a plurality of database index entries associated with the inserted rows to the index increments; a program code for generating an additional index increment from the plurality of index increments in response to an index increment having a memory size that approaches the memory size of volatile cache available to the database generating the index increments; satisfying a database request by performing a parallel index scan of the base index and the index increments, the parallel index scan scanning the base index and the index increments concurrently, the database request received subsequent to insertion of the row; and a program code for merging the index increments with the base index in response to a query response time for the database exceeding a first predefined criterion defined by an administrator of the database table and a number of index entries exceeding a second predefined criterion upon completion of the step of adding the plurality of index entries to the index increments, the merging performed during off-peak hours, such that database index entries added to the base index satisfy a predefined ordering of the base index. - View Dependent Claims (9)
-
Specification