The SQL History tab of the Preferences window allows users to specify which functions save the SQL statements.
Optimize (Default = checked)
Save the SQL statement every time it is optimized in the SQL Optimizer module.
Run Time (Default = checked)
Save the SQL statement when the run time is retrieved using the Run Time function.
Execute in SQL Worksheet (Default = cleared)
Save the SQL statement when it is executed in the SQL Worksheet.
Show Plan (Default = checked)
Save the SQL statement every time the query plan is retrieved using the Show Plan function.
Run Result (Default = checked)
Save the SQL statement when it is executed using the Run Result function.
Advise Indexes (Default = cleared)
Save the SQL statement every time indexes are generated for it the Index Advisor module.
Specify the maximum number of SQL statements that are stored in the SQL History.
When the number of SQL statement in the SQL History reaches it maximum, the SQL statements removes SQL statements based on one of the following criteria:
Removes the SQL statement with the oldest date and time in the Last Used Datetime column.
Least frequently used
Removes the SQL statement with the lowest value in the Times Used column.