Automatic SQL tuning advisor
First Claim
Patent Images
1. A computer implemented method, comprising:
- using a computer system which comprises at least one computer processor and is programmed for performing;
receiving a database query language statement and performance information about the database query language statement at an optimizer;
receiving a time budget for tuning the database query language statement;
generating one or more tuning recommendations for the database query language statement,whereinthe one or more tuning recommendations are generated based at least in part upon the performance information with consideration of the time budget, the one or more tuning recommendations comprise one or more rewrites of database query language text for the database query language statement,the generating the one or more tuning recommendations further comprises;
performing an automatic access path analysis to recommend one or more indices based at least in part on one or more data access patterns of the database query language statement and upon when the database query language statement performance is improved by replacing one or more existing access path by one or more new index access paths,performing an automatic structure analysis that generates one or more tuning recommendations for one or more rewrites for the database query language statement, andperforming an automatic statistics analysis that generates adjustment factors to correct one or more missing or stale statistics,at least one of the one or more rewrites of the database query language text is not semantically equivalent to the database query language text of the database query language statement in that the at least one of the one or more rewrites of the database query language text comprises a second query operator function which is used to replace a different, first query operation function in the database query language text of the database query language statement and the one or more rewrites of the database query language text produces an equivalent query result as the database query language text of the database query language statement does, andat least one of the one or more tuning recommendations is associated with a rationale to help a user understand the at least one of the one or more tuning recommendations, in which the rationale comprises information about an execution plans before applying the at least one of the one or more tuning recommendations and one or more first execution plans that are generated after applying the at least one of the one or more tuning recommendations; and
displaying the one or more tuning recommendations on a display device or storing the one or more tuning recommendations in data structures configured for the tuning recommendations on a computer readable storage medium of the computer system.
1 Assignment
0 Petitions
Accused Products
Abstract
A method for receiving a database query language statement and performance information about the statement at an optimizer and generating one or more tuning actions for the statement with the performance information is disclosed.
130 Citations
22 Claims
-
1. A computer implemented method, comprising:
-
using a computer system which comprises at least one computer processor and is programmed for performing; receiving a database query language statement and performance information about the database query language statement at an optimizer; receiving a time budget for tuning the database query language statement; generating one or more tuning recommendations for the database query language statement, wherein the one or more tuning recommendations are generated based at least in part upon the performance information with consideration of the time budget, the one or more tuning recommendations comprise one or more rewrites of database query language text for the database query language statement, the generating the one or more tuning recommendations further comprises; performing an automatic access path analysis to recommend one or more indices based at least in part on one or more data access patterns of the database query language statement and upon when the database query language statement performance is improved by replacing one or more existing access path by one or more new index access paths, performing an automatic structure analysis that generates one or more tuning recommendations for one or more rewrites for the database query language statement, and performing an automatic statistics analysis that generates adjustment factors to correct one or more missing or stale statistics, at least one of the one or more rewrites of the database query language text is not semantically equivalent to the database query language text of the database query language statement in that the at least one of the one or more rewrites of the database query language text comprises a second query operator function which is used to replace a different, first query operation function in the database query language text of the database query language statement and the one or more rewrites of the database query language text produces an equivalent query result as the database query language text of the database query language statement does, and at least one of the one or more tuning recommendations is associated with a rationale to help a user understand the at least one of the one or more tuning recommendations, in which the rationale comprises information about an execution plans before applying the at least one of the one or more tuning recommendations and one or more first execution plans that are generated after applying the at least one of the one or more tuning recommendations; and displaying the one or more tuning recommendations on a display device or storing the one or more tuning recommendations in data structures configured for the tuning recommendations on a computer readable storage medium of the computer system. - View Dependent Claims (2, 3, 4, 5, 6, 20)
-
-
7. An apparatus, comprising:
-
a computer readable storage medium that holds computing instructions for execution; at least one computer processor that executes the computing instructions, wherein the computing instructions comprise; integrating tuning advice for a high load statement from a plurality of sources; receiving a time budget for tuning the high load statement; and generating one or more tuning recommendations from the tuning advice with consideration of the time budget, wherein the one or more tuning recommendations comprise one or more rewrites of database query language text for the high load statement, and the generating the one or more tuning recommendations further comprises; performing an automatic access path analysis to recommend one or more indices based at least in part on one or more data access patterns of the high load statement and upon when performance of the high load statement is improved by replacing one or more existing access path by one or more new index access paths, performing an automatic structure analysis that generates one or more tuning recommendations for one or more rewrites for the high load statement, and performing an automatic statistics analysis that generates adjustment factors to correct one or more missing or stale statistics, at least one of the one or more rewrites of the database query language text is not semantically equivalent to the database query language text of the high load statement in that the at least one of the one or more rewrites of the database query language text comprises a second query operator function which is used to replace a different, first query operation function in the database query language text of the high load statement and the one or more rewrites of the database query language text produces an equivalent query result as the database query language text of the high load statement does, and at least one of the one or more tuning recommendations is associated with a rationale to help a user understand the at least one of the one or more tuning recommendations, in which the rationale comprises information about an execution plans before applying the at least one of the one or more tuning recommendations and one or more first execution plans that are generated after applying the at least one of the one or more tuning recommendations. - View Dependent Claims (8, 9, 10, 11, 12, 21)
-
-
13. A computer readable storage medium storing a computer program having a sequence of instructions which, when executed by a processing system, causes the processing system to perform a process, the process comprising:
-
using the processing system which comprises at least one computer processor and is programmed for performing; receiving a database query language statement and performance information about the database query language statement at an optimizer; receiving a time budget for tuning the database query language statement; and generating one or more tuning recommendations for the database query language statement, wherein the one or more tuning recommendations are generated based at least in part upon the performance information with consideration of the time budget, the one or more tuning recommendations comprise one or more rewrites of database query language text for the database query language statement, the generating the one or more tuning recommendations further comprises; performing an automatic access path analysis to recommend one or more indices based at least in part on one or more data access patterns of the database query language statement and upon when the database query language statement performance is improved by replacing one or more existing access path by one or more new index access paths, performing an automatic structure analysis that generates one or more tuning recommendations for one or more rewrites for the database query language statement, and performing an automatic statistics analysis that generates adjustment factors to correct one or more missing or stale statistics, at least one of the one or more rewrites of the database query language text is not semantically equivalent to the database query language text of the database query language statement in that the at least one of the one or more rewrites comprises a second query operation function which is used to replace a different, first query operation function in the database query language text of the database query language statement and the database query language text produces an equivalent query result as the database query language text of the database query language statement does, and at least one of the one or more tuning recommendations is associated with a rationale to help a user understand the at least one of the one or more tuning recommendations, in which the rationale comprises information about an execution plans before applying the at least one of the one or more tuning recommendations and one or more first execution plans that are generated after applying the at least one of the one or more tuning recommendations. - View Dependent Claims (14, 15, 16, 17, 18, 19, 22)
-
Specification