Method and system for implementing a SQL profile
First Claim
Patent Images
1. A computer program product comprising a volatile or non-volatile computer usable medium having executable code to execute a process for optimizing a query statement, the process comprising:
- storing a profile for the query statement in a data structure on a tangible computer usable medium or a computer storage device separately from the query statement;
optimizing, by using a processor of a computer, the query statement using at least the profile, wherein the profile comprises;
a tuning action for guiding generation or changing of an execution plan for the query statement without modifying the query statement;
a statement signature to identify the query statement for retrieval of the profile for the query statement during compilation of the query statement; and
tuning data to tune the query statement based at least in part on execution history of the query statement from at least one request with the query statement, whereinthe at least one request was executed prior to a current compilation of the query statement, andwithout modifying the query statement, the tuning data are used to identify at least one optimizer setting for the current compilation of the query statement to generate or change the execution plan for the query statement.
1 Assignment
0 Petitions
Accused Products
Abstract
A method, apparatus, and computer program product with a persistent data structure for storing a profile of tuning information for a query statement separately from the query statement. The profile in the persistent data structure includes a statement signature to identify the query statement, and an action to tune the statement.
157 Citations
25 Claims
-
1. A computer program product comprising a volatile or non-volatile computer usable medium having executable code to execute a process for optimizing a query statement, the process comprising:
-
storing a profile for the query statement in a data structure on a tangible computer usable medium or a computer storage device separately from the query statement; optimizing, by using a processor of a computer, the query statement using at least the profile, wherein the profile comprises; a tuning action for guiding generation or changing of an execution plan for the query statement without modifying the query statement; a statement signature to identify the query statement for retrieval of the profile for the query statement during compilation of the query statement; and tuning data to tune the query statement based at least in part on execution history of the query statement from at least one request with the query statement, wherein the at least one request was executed prior to a current compilation of the query statement, and without modifying the query statement, the tuning data are used to identify at least one optimizer setting for the current compilation of the query statement to generate or change the execution plan for the query statement. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A method of optimizing a query statement comprising:
-
receiving the query statement at an optimizer; retrieving a profile for the query statement during compilation of the query statement at the optimizer; optimizing, by using a processor of a computer, the query statement using at least the profile, wherein the profile comprises; a tuning action for guiding generation or changing of an execution plan for the query statement without modifying the query statement; tuning data to tune the query statement based at least in part on execution history of the query statement from at least one request with the query statement; and a statement signature to identify the query statement for retrieval of the profile for the query statement during compilation of the query statement; and the at least one request was executed prior to a current compilation of the query statement, wherein the tuning data are used to identify or change one or more optimizer settings for a current compilation of the query statement to generate or change an execution plan for the query statement without modifying the query statement; and storing the profile in a first data structure on a tangible computer usable medium or a computer storage device separately from the query statement; storing the execution plan in the data structure or a second data structure on the tangible computer usable medium, a second tangible computer usable medium, or a computer storage device separately from the query statement or displaying the execution plan on a display apparatus. - View Dependent Claims (13, 14, 15, 16, 17, 18)
-
-
19. An apparatus for optimizing a statement comprising:
-
means for receiving a query statement at an optimizer; and means for retrieving a profile for the query statement during compilation of the query statement; means for optimizing the query statement, wherein the means for optimizing the query statement comprises a computer processor, the profile comprises; a tuning action for guiding generation or changing of an execution plan for the query statement without modifying the query statement; tuning data to tune the query statement based at least in part on execution history of the query statement from at least one request with the query statement; and a statement signature to identify the query statement for retrieval of the profile for the query statement during compilation of the query statement; the at least one request was executed prior to a current compilation of the query statement, wherein the tuning data are used to identify or change one or more optimizer settings for a current compilation of the query statement to generate an execution plan for the query statement without modifying the query statement; and a tangible computer usable medium or a computer storage device configured for storing the profile separately from the query statement in a first data structure; and the tangible computer usable medium, a second tangible computer usable medium, the computer storage device, or a second computer storage device configured for storing the execution plan separately from the query statement in the data structure or a second data structure or a display apparatus configured for displaying the execution plan. - View Dependent Claims (20, 21, 22, 23, 24, 25)
-
Specification