The TimesTen query optimizer uses statistics stored in TimesTen database system tables to compute the optimal execution plan for a statement. Table-level statistics such as the number of rows in a table are stored in the SYS.TBL_STATS table. Column-level statistics such as the minimum and maximum value, and the number of unique values in a column are stored in the SYS.COL_STATS table.
Table and column statistics are not computed as updates occur on regular and cache tables. Instead statistics are updated when an explicit request is made to compute them.
Click the + to the left of the Tables node to view the list of tables. Right-click the name of the table that you want to update the optimizer statistics for.
After you right-click the name of the table that you want to update the optimizer statistics for, select Statistics, then Update.
In the Prompts tab of the Update statistics dialog box, put a check in the Invalidate referenced commands check box if you want the invalidate the execution plans of statements that reference the table whose statistics will be updated. Invalidating a statement's execution plan causes that statement to be recompiled or re-prepared upon its next execution.
In the Interval type for table statistics pull-down menu, select Complete interval to divide the rows of the table into two or more intervals and compute statistics on each interval, or Single interval to compute statistics on the entire set of rows as a single interval. A range index must be defined on the table in order to collect complete interval statistics.
Click the Apply button to update statistics for the table.
Related Topics