Database index validation mechanism
First Claim
1. A method for evaluating a plurality of candidate index sets for a workload of database statements in a database system, the method comprising:
- forming an index superset from a union of a current index set and a proposed index set;
deriving a candidate index set from the index superset, the derived candidate index set being incorporated into the plurality of candidate index sets;
analyzing collected database statistics based on the derived candidate index set;
repeatedly deriving a candidate index set and analyzing collected statistics based on the proposed index set;
terminating the repeated execution when at least one candidate index solution is found that adheres to user-imposed constraints and no further indexes can be removed from said candidate index solution without degrading performance of the workload and without disabling an integrity constraint, wherein the integrity constraint describes a condition about the database that must always be true or must always be false; and
presenting the analyzed collected statistics.
2 Assignments
0 Petitions
Accused Products
Abstract
A method evaluates a plurality of candidate index sets for a workload of database statements in a database system by first generating baseline statistics for each statement in the workload. An index superset is formed by combining an existing or current index set and a proposed index set. A candidate index set is derived from the index superset, the candidate index being one of the plurality of candidate index sets. Statistics for a statement are generated by first creating an execution plan which represents an efficient series of steps for executing the statement given the candidate index set. The execution plan is evaluated, and statistics based on the evaluation of the execution plan are generated and recorded. The cost of the execution plan is then determined and statistics are generated. Statistics for each candidate index set are rolled up and presented to a user or an index tuning mechanism.
81 Citations
105 Claims
-
1. A method for evaluating a plurality of candidate index sets for a workload of database statements in a database system, the method comprising:
-
forming an index superset from a union of a current index set and a proposed index set; deriving a candidate index set from the index superset, the derived candidate index set being incorporated into the plurality of candidate index sets; analyzing collected database statistics based on the derived candidate index set; repeatedly deriving a candidate index set and analyzing collected statistics based on the proposed index set; terminating the repeated execution when at least one candidate index solution is found that adheres to user-imposed constraints and no further indexes can be removed from said candidate index solution without degrading performance of the workload and without disabling an integrity constraint, wherein the integrity constraint describes a condition about the database that must always be true or must always be false; and presenting the analyzed collected statistics. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26)
-
-
27. A system for evaluating a plurality of candidate index sets for a workload in a database system, the workload derived from a plurality of statements, the system comprising:
-
a workload evaluator, including a processor, wherein the workload evaluator evaluates each statement within the workload using collected database statistics; an index solution evaluator which, responsive to the workload evaluator, evaluates each index in a candidate index set with respect to the workload, the candidate index solution being one of the plurality of candidate index sets, each candidate index set derived from an index superset formed by the union of a current index set and a proposed index set; a solution/rollup evaluator which, responsive to the index solution evaluator, evaluates the candidate index solution; and a solution refiner which, responsive to the solution/rollup evaluator, generates at least one new candidate index solution, the at least one new candidate index solution being incorporated into the plurality of candidate index sets, wherein the solution refiner further generates at least one new candidate index solution by eliminating at least one index on a small table under evaluation, wherein the at least one index does not enforce an integrity constraint, wherein the integrity constraint describes a condition about the database that must always be true or must always be false. - View Dependent Claims (28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53)
-
-
54. A computer program product for evaluating a plurality of candidate index sets for a workload of database statements in a database system, the computer program product comprising a computer usable medium having computer readable code thereon, including program code which:
-
forms an index superset from a union of a current index set and a proposed index set; repeatedly derives a candidate index set from the index superset, the derived candidate index set being incorporated into the plurality of candidate index sets, generates statistics based on the proposed index set, and analyzes collected database statistics based on the derived candidate index set; terminates the repeated execution when at least one candidate index solution is found that adheres to user-imposed constraints and no further indexes can be removed from said candidate index solution without degrading performance of the workload and without disabling an integrity constraint, wherein the integrity constraint describes a condition about the database that must always be true or must always be false; and presents the analyzed statistics. - View Dependent Claims (55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79)
-
-
80. A system for evaluating a plurality of candidate index sets for a workload of database statements in a database system, comprising:
-
means for forming an index superset from a union of a current index set and a proposed index set, wherein the means include a processor; means for deriving a candidate index set from the index superset, the derived candidate index set being incorporated into the plurality of candidate index sets; means for analyzing collected database statistics based on the derived candidate index set; means for repeatedly deriving a candidate index set and generating statistics based on the proposed index set; means for terminating the repeated execution when at least one candidate index solution is found that adheres to user-imposed constraints and no further indexes can be removed from said candidate index solution without degrading performance of the workload and without disabling an integrity constraint, wherein the integrity constraint describes a condition about the database that must always be true or must always be false; and means for presenting the analyzed statistics. - View Dependent Claims (81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105)
-
Specification