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.