# US 2021/0081356 A1 · Automated information lifecycle management of indexes

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0081356 A1
- Document ID: US20210081356A1
- Status: Published application
- Kind: A1
- Application number: 16/926,425
- Filed: 2020-07-10
- Published: 2021-03-18
- Earliest claimed: 2019-09-13
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Kamaljit Shergill; Hariharan Lakshmanan; Viral Shah; Shasank Kisan Chavan
- Web page: https://patentgrep.com/patent/US20210081356A1

## CPC

- G06F 16/122: {using management policies (point-in-time backing up or restoration of persistent data G06F11/1446; file migration policies for HSM systems G06F16/185)}
- G06F 16/2272: {Management thereof}
- G06F 16/901: Indexing; Data structures therefor; Storage structures (for retrieval from the web G06F16/951)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques are provided for a DBMS automating ILM on indexes, based on index composition, to efficiently reduce index storage footprints. According to an embodiment, a user sets an index-specific ILM (ISILM) policy, which comprises one or both of an index-test requirement and a time requirement. Based on the ISILM policy being met, or on some other way of initiating analysis, the DBMS automatically analyzes the data blocks storing the index to determine an index condition metric (e.g., percentage of free space). This analysis is performed on a sample of data blocks storing the index without blocking the index from other operations during the analysis. The condition metric for the entire index is estimated based on analysis of the sample data blocks. Using the determined condition metric for an index, the DBMS automatically selects an option for optimally managing the index (e.g., coalesce, shrink space, index rebuild, no action, etc.).

## Claims

### Claim 1

A computer-executed method comprising:
maintaining, by a database management system, an index that (a) is associated with a table and (b) is allocated a plurality of data blocks, in which index data for the table is stored;
maintaining, by the database management system, an index optimization ruleset that comprises a plurality of index management options and one or more condition metric thresholds;
determining to analyze the index for optimization;
in response to said determining to analyze the index for optimization:
analyzing one or more data blocks, of the plurality of data blocks, to generate a condition metric for the index;
selecting, based on the generated condition metric for the index and the one or more condition metric thresholds, an index management option, of the plurality of index management options, to be implemented for the index; and
implementing the selected index management option on the index;
wherein the method is performed by one or more computing devices.

### Claim 2 (depends on 1)

The computer-executed method of claim 1, wherein the one or more data blocks comprise less than all of the plurality of data blocks.

### Claim 3 (depends on 1)

The computer-executed method of claim 1, wherein said analyzing the one or more data blocks, of the plurality of data blocks, to generate the condition metric for the index comprises:
determining a sample percentage of free space within the one or more data blocks; and
estimating an index-wide percentage of free space, within the plurality of data blocks, based upon the determined sample percentage of free space;
wherein the condition metric reflects the estimated index-wide percentage of free space.

### Claim 4 (depends on 1)

The computer-executed method of claim 1, wherein analyzing the one or more data blocks to generate the condition metric for the index is performed while the index is configured to allow index requests.

### Claim 5 (depends on 1)

The computer-executed method of claim 1, wherein the plurality of index management options comprises two or more of: (a) an index rebuild action, (b) an index shrink action, (c) an index coalesce action, and (d) a no-action option.

### Claim 6 (depends on 5)

The computer-executed method of claim 5, wherein said selected index management option, to be implemented for the index, is the no-action option.

### Claim 7 (depends on 1)

The computer-executed method of claim 1, wherein:
the one or more condition metric thresholds define an ordered plurality of condition metric ranges;
each index management option, of the plurality of index management options, is associated with a cost valuation;
a lowest condition metric range, of the ordered plurality of condition metric ranges, is associated with a lowest-cost valuation index management option of the plurality of index management options; and
a highest condition metric range, of the ordered plurality of condition metric ranges, is associated with a highest-cost valuation index management option of the plurality of index management options.

### Claim 8 (depends on 7)

The computer-executed method of claim 7, wherein the lowest-cost valuation index management option is a no-action option and the highest-cost valuation index management option comprises an index rebuild action.

### Claim 9 (depends on 8)

The method of claim 8, wherein an intermediate condition metric range, of the ordered plurality of condition metric ranges, is associated with an intermediate-cost valuation index management option comprising a shrink-space action.

### Claim 10 (depends on 1)

The computer-executed method of claim 1, further comprising, after implementing the selected index management option on the index, automatically adjusting at least one condition metric threshold of the one or more condition metric thresholds based, at least in part, on historical index management data.

### Claim 11 (depends on 10)

The computer-executed method of claim 10, wherein:
each index management option, of the plurality of index management options, is associated with a range of condition metric values based, at least in part, on the one or more condition metric thresholds; and
the method further comprises performing an optimization tuning experiment comprising:
modifying the ranges, associated with the plurality of index management options, to overlap by an experimentation amount;
after modifying the ranges, determining to analyze, for optimization, a second index maintained by the database management system;
in response to said determining to analyze the second index for optimization:
determining a second condition metric for the second index,
wherein the second condition metric falls within two overlapping ranges of condition metric values associated with two index management options of the plurality of index management options,
randomly selecting a particular index management option of the two index management options to be implemented for the second index,
implementing the particular index management option on the second index, and
recording, in the historical index management data, information regarding said implementing the particular index management option on the second index.

### Claim 12 (depends on 11)

The computer-executed method of claim 11, wherein the information regarding said implementing the particular index management option on the second index comprises one or more of:
the particular index management option;
a percentage of free space in the second index before implementing the particular index management option;
a percentage of free space in the second index after implementing the particular index management option;
an amount of time the particular index management option took to implement;
a measure of processing power that the particular index management option took to implement;
a size of the second index before implementing the particular index management option;
a size of the second index after implementing the particular index management option;
a type of the second index;
a type of data stored in the second index; or
a measure of volatility of the second index.

### Claim 13 (depends on 1)

The computer-executed method of claim 1, further comprising:
wherein the index is associated with a management policy that comprises a test requirement and a time requirement;
determining whether the management policy, for the index, has been met based on the test requirement and the time requirement;
wherein said determining to analyze the index for optimization is based on determining that the management policy, for the index, has been met.

### Claim 14 (depends on 1)

The computer-executed method of claim 1, wherein the index optimization ruleset is a first index optimization ruleset of a plurality of index optimization rulesets, the method further comprising:
maintaining, by the database management system, a second index optimization ruleset, of the plurality of index optimization rulesets;
wherein the first index optimization ruleset is associated with a first qualifier condition that is based on a particular index attribute;
wherein the second index optimization ruleset is associated with a second qualifier condition that is based on the particular index attribute;
prior to said selecting the index management option to be implemented for the index, selecting the first index optimization ruleset, of the plurality of index optimization rulesets, based on a value of the particular index attribute, for the index, satisfying the first qualifier condition associated with the first index optimization ruleset;
wherein said selecting the index management option based, in part, on the one or more condition metric thresholds of the first index optimization ruleset is based on said selecting the first index optimization ruleset.

### Claim 15

One or more non-transitory computer-readable media storing one or more sequences of instructions that, when executed by one or more processors, cause:
maintaining, by a database management system, an index that (a) is associated with a table and (b) is allocated a plurality of data blocks, in which index data for the table is stored;
maintaining, by the database management system, an index optimization ruleset that comprises a plurality of index management options and one or more condition metric thresholds;
determining to analyze the index for optimization;
in response to said determining to analyze the index for optimization:
analyzing one or more data blocks, of the plurality of data blocks, to generate a condition metric for the index;
selecting, based on the generated condition metric for the index and the one or more condition metric thresholds, an index management option, of the plurality of index management options, to be implemented for the index; and
implementing the selected index management option on the index.

### Claim 16 (depends on 15)

The one or more non-transitory computer-readable media of claim 15, wherein the one or more data blocks comprise less than all of the plurality of data blocks.

### Claim 17 (depends on 15)

The one or more non-transitory computer-readable media of claim 15, wherein said analyzing the one or more data blocks, of the plurality of data blocks, to generate the condition metric for the index comprises:
determining a sample percentage of free space within the one or more data blocks; and
estimating an index-wide percentage of free space, within the plurality of data blocks, based upon the determined sample percentage of free space;
wherein the condition metric reflects the estimated index-wide percentage of free space.

### Claim 18 (depends on 15)

The one or more non-transitory computer-readable media of claim 15, wherein analyzing the one or more data blocks to generate the condition metric for the index is performed while the index is configured to allow index requests.

### Claim 19 (depends on 15)

The one or more non-transitory computer-readable media of claim 15, wherein the plurality of index management options comprises two or more of: (a) an index rebuild action, (b) an index shrink action, (c) an index coalesce action, and (d) a no-action option.

### Claim 20 (depends on 19)

The one or more non-transitory computer-readable media of claim 19, wherein said selected index management option, to be implemented for the index, is the no-action option.

### Claim 21 (depends on 15)

The one or more non-transitory computer-readable media of claim 15, wherein:
the one or more condition metric thresholds define an ordered plurality of condition metric ranges;
each index management option, of the plurality of index management options, is associated with a cost valuation;
a lowest condition metric range, of the ordered plurality of condition metric ranges, is associated with a lowest-cost valuation index management option of the plurality of index management options; and
a highest condition metric range, of the ordered plurality of condition metric ranges, is associated with a highest-cost valuation index management option of the plurality of index management options.

### Claim 22 (depends on 21)

The one or more non-transitory computer-readable media of claim 21, wherein the lowest-cost valuation index management option is a no-action option and the highest-cost valuation index management option comprises an index rebuild action.

### Claim 23 (depends on 22)

The one or more non-transitory computer-readable media of claim 22, wherein an intermediate condition metric range, of the ordered plurality of condition metric ranges, is associated with an intermediate-cost valuation index management option comprising a shrink-space action.

### Claim 24 (depends on 15)

The one or more non-transitory computer-readable media of claim 15, wherein the one or more sequences of instruction further comprise instructions that, when executed by one or more processors, cause, after implementing the selected index management option on the index, automatically adjusting at least one condition metric threshold of the one or more condition metric thresholds based, at least in part, on historical index management data.

### Claim 25 (depends on 24)

The one or more non-transitory computer-readable media of claim 24, wherein:
each index management option, of the plurality of index management options, is associated with a range of condition metric values based, at least in part, on the one or more condition metric thresholds; and
the one or more sequences of instruction further comprise instructions that, when executed by one or more processors, cause performing an optimization tuning experiment comprising:
modifying the ranges, associated with the plurality of index management options, to overlap by an experimentation amount;
after modifying the ranges, determining to analyze, for optimization, a second index maintained by the database management system;
in response to said determining to analyze the second index for optimization:
determining a second condition metric for the second index,
wherein the second condition metric falls within two overlapping ranges of condition metric values associated with two index management options of the plurality of index management options,
randomly selecting a particular index management option of the two index management options to be implemented for the second index,
implementing the particular index management option on the second index, and
recording, in the historical index management data, information regarding said implementing the particular index management option on the second index.

### Claim 26 (depends on 25)

The one or more non-transitory computer-readable media of claim 25, wherein the information regarding said implementing the particular index management option on the second index comprises one or more of:
the particular index management option;
a percentage of free space in the second index before implementing the particular index management option;
a percentage of free space in the second index after implementing the particular index management option;
an amount of time the particular index management option took to implement;
a measure of processing power that the particular index management option took to implement;
a size of the second index before implementing the particular index management option;
a size of the second index after implementing the particular index management option;
a type of the second index;
a type of data stored in the second index; or
a measure of volatility of the second index.

### Claim 27 (depends on 15)

The one or more non-transitory computer-readable media of claim 15, wherein the one or more sequences of instruction further comprise instructions that, when executed by one or more processors, cause:
wherein the index is associated with a management policy that comprises a test requirement and a time requirement;
determining whether the management policy, for the index, has been met based on the test requirement and the time requirement;
wherein said determining to analyze the index for optimization is based on determining that the management policy, for the index, has been met.

### Claim 28 (depends on 15)

The one or more non-transitory computer-readable media of claim 15, wherein:
the index optimization ruleset is a first index optimization ruleset of a plurality of index optimization rulesets; and
wherein the one or more sequences of instruction further comprise instructions that, when executed by one or more processors, cause:
maintaining, by the database management system, a second index optimization ruleset, of the plurality of index optimization rulesets,
wherein the first index optimization ruleset is associated with a first qualifier condition that is based on a particular index attribute,
wherein the second index optimization ruleset is associated with a second qualifier condition that is based on the particular index attribute,
prior to said selecting the index management option to be implemented for the index, selecting the first index optimization ruleset, of the plurality of index optimization rulesets, based on a value of the particular index attribute, for the index, satisfying the first qualifier condition associated with the first index optimization ruleset, and
wherein said selecting the index management option based, in part, on the one or more condition metric thresholds of the first index optimization ruleset is based on said selecting the first index optimization ruleset.
