Export the Table Statistics Used By the TimesTen Query Optimizer

You can generate a set of SQL statements that allow you to restore the table statistics to the current state. You can generate SQL statements for a single table or for user tables that the connection user has permission to access. After you export your table statistics to a .sql file, you can import your table statistics by opening the .sql file in SQL Developer and running the script file.

To export the current TimesTen table statistics, make sure you are on the main SQL Developer page.

  1. To save table statistics for a single table, right-click the name of the table and select Statistics, then select Export. To save table statistics for all user tables, right-click Tables and select Statistics, then select Export.

    The Export Optimizer Statistics dialog displays. Locate the Save button at the bottom right of the dialog.

  2. Click Save.

    The Save Optimizer Statistics Export Commands dialog displays.

  3. Select the directory where you want to save the current TimesTen table statistics.

  4. In the File Name field, define the name of your current TimesTen table statistics.

    The default filename of the current TimesTen table statistics is connection_name-exportstatistics-YYYYMMDDMISS.sql, where connection_name is the name of the connection. YYYYMMDDHHMISS is a timestamp of when the recommendations were made, where YYYY is the year, MM the month, DD the day, HH the hour, MI the minutes, and SS the seconds.

  5. Click Save.

    TimesTen saves your current TimesTen table statistics.

Related Topics

SQL Developer: TimesTen Tasks

SQL Developer Concepts and Usage