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.
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. 7. The method as recited in claim 1 , further comprising parsing the selected database query to determine whether the database query includes at least one subquery joined by at least one of a NOT EXISTS, a NOT IN and an ALL clause.