System and method for automatically generating database queries
First Claim
Patent Images
1. A method of tuning a database query, comprising:
- allowing a user to select a query of a database;
parsing the selected database query to determine that the database query includes a first operator;
selecting an optimization mode from a plurality of available optimization modes, wherein;
a first optimization mode is automatically selected if one or more statistics exist for a table identified by the database query, anda second optimization mode is selected if one or more statistics do not exist for the table identified by the database query;
tuning automatically the selected database query based on the structure of the database and the selected optimization mode; and
displaying the tuned database query, andwherein automatically tuning the selected database query comprises automatically rewriting the selected database query by converting the first operator to a second operator.
1 Assignment
0 Petitions
Accused Products
Abstract
A method of tuning a database query includes selecting a database query, parsing the selected database query to determine relationships between portions of the selected database query, selecting an optimization mode from a plurality of available optimization modes, tuning the selected database query by modifying, at least one portion of the selected database query based on the determined relationships and the selected optimization mode and displaying the modified database query.
51 Citations
38 Claims
-
1. A method of tuning a database query, comprising:
-
allowing a user to select a query of a database; parsing the selected database query to determine that the database query includes a first operator; selecting an optimization mode from a plurality of available optimization modes, wherein; a first optimization mode is automatically selected if one or more statistics exist for a table identified by the database query, and a second optimization mode is selected if one or more statistics do not exist for the table identified by the database query; tuning automatically the selected database query based on the structure of the database and the selected optimization mode; and displaying the tuned database query, and wherein automatically tuning the selected database query comprises automatically rewriting the selected database query by converting the first operator to a second operator. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
-
15. A computer storage medium including computer executable code for tuning a database query, comprising:
-
computer executable code for allowing a user to select a query of a database; computer executable code for parsing the selected database query to determine that the database query includes a first operator; computer executable code for selecting an optimization mode from a plurality of available optimization modes, wherein; a first optimization mode is automatically selected if one or more statistics exist for a table identified by the database query, and a second optimization mode is selected if one or more statistics do not exist for the table identified by the database query; computer executable code for automatically tuning the selected database query based on the structure of the database and the selected optimization mode; and computer executable code for displaying the tuned database query, and wherein the computer executable code for automatically tuning the selected database query comprises computer executable code for automatically rewriting the selected database query by converting the first operator to a second operator. - View Dependent Claims (16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
-
-
26. A programmed computer system for tuning a database query, comprising:
-
a display for displaying at least one of a plurality of database queries of a database to a user; a user input allowing the user to select a database query from among the displayed database queries; and a processor for parsing the selected database query to determine that the database query includes a first operator and for automatically tuning the selected database query based on the structure of the database, the tuned database query being displayed to the user via the display, wherein automatically tuning the selected database query comprises; automatically selecting a first optimization mode if one or more statistics exist for a table identified by the database query, and selecting a second optimization mode is selected if one or more statistics do not exist for the table identified by the database query, and wherein automatically tuning the selected database query comprises automatically rewriting the selected database query by converting the first operator to a second operator. - View Dependent Claims (27, 28, 29, 30, 31, 32, 33, 34, 35, 36)
-
-
37. A method of tuning a database query, comprising:
-
allowing a user to select a query of a database; parsing the selected database query to determine that the database query includes a first operator; selecting an optimization mode from a plurality of available optimization modes; tuning automatically the selected database query based on the structure of the database and the selected optimization mode; and displaying the tuned database query, wherein automatically tuning the selected database query comprises automatically rewriting the selected database query by converting the first operator to a second operator, and wherein selecting the optimization mode from the plurality of available optimization modes comprises; determining whether one or more statistics exist for a table identified by the query; automatically selecting a first optimization mode if the one or more statistics exist for the table; and automatically selecting a second optimization mode if the one or more statistics do not exist for the table.
-
-
38. A method of tuning a database query, comprising:
-
allowing a user to select a query of a database; parsing the selected database query to determine that the database query includes a first operator; selecting an optimization mode from a plurality of available optimization modes; tuning automatically the selected database query based on the structure of the database and the selected optimization mode; and displaying the tuned database query, wherein automatically tuning the selected database query comprises automatically rewriting the selected database query by converting the first operator to a second operator, and wherein selecting the optimization mode from the plurality of available optimization modes comprises; determining whether one or more statistics exist for a table identified by the query; automatically selecting a first optimization mode if the one or more statistics exist for the table; and receiving user preferences for selecting a second optimization mode if the one or more statistics do not exist for the table.
-
Specification