Regression testing of SQL execution plans for SQL statements
AssigneeInternational Business Machines Corporation
InventorJonathan M. Harding
Life of this patent
Estimating the term…
Abstract
A first execution plan for a first version of a structured query language statement can be requested from a database management system. The first execution plan for the first version of the structured query language statement can be loaded into a first directed graph tree structure comprising a plurality of nodes. The first directed graph tree structure can be scanned to determine whether a full table scan for accessing requested data is represented by at least a one of the plurality of nodes of the directed graph tree structure. Responsive to determining that the full table scan for accessing the requested data is represented by the at least one of the plurality of nodes of the directed graph tree structure, a first indicator that indicates a fault condition can be output.
Claims14
A system, comprising:
- a processor programmed to initiate executable operations comprising:
- requesting from a database management system a first execution plan for a first version of a structured query language statement;
- loading the first execution plan for the first version of the structured query language statement into a first directed graph tree structure comprising a plurality of nodes;
- scanning the first directed graph tree structure to determine whether a full table scan for accessing requested data is represented by at least a one of the plurality of nodes of the directed graph tree structure;
- determining whether a database index is available for the accessing the requested data in lieu of the full table scan;
- and
- responsive to determining that the full table scan for accessing the requested data is represented by the at least one of the plurality of nodes of the directed graph tree structure and responsive to determining that the database index is available for accessing the requested data, outputting a first indicator that indicates a fault condition.
A computer program product comprising a computer readable storage medium having program code stored thereon, the program code executable by a processor to perform a method comprising:
- requesting, by the processor, from a database management system a first execution plan for a first version of a structured query language statement;
- loading, by the processor, the first execution plan for the first version of the structured query language statement into a first directed graph tree structure comprising a plurality of nodes;
- scanning, by the processor, the first directed graph tree structure to determine whether a full table scan for accessing requested data is represented by at least a one of the plurality of nodes of the directed graph tree structure;
- determining, by the processor, whether a database index is available for the accessing the requested data in lieu of the full table scan;
- and
- responsive to determining that the full table scan for accessing the requested data is represented by the at least one of the plurality of nodes of the directed graph tree structure and responsive to determining that the database index is available for accessing the requested data, outputting, by the processor, a first indicator that indicates a fault condition.
Dependencies are inferred from the claim text.