The statistics for temp-tables (available though _TableStat and _IndexStat virtual system tables) are lost once the temp-tables (and its indexes) are deleted. Therefore, there is a need to collect the statistics for usage of temp-tables. There are two ways to save the table and index statistics for temp-tables. It can be done through the log entry type TTStats or by archiving the statistics with the TableStatHistory/IndexStatHistory temp-tables. The data from these tables can be written to an XML file before the session ends.
The new logging entry type parameter TTStats enables logging of temp-table usage statistics in the corresponding client or server log files.
If you enable TTStats with a logging level of 2 or greater, and the startup parameter -tttablerangesize is set to a value greater than 0, the ABL virtual machine (AVM) logs an entry that contains temp-table statistics and includes the table name, and the procedure or class name. The AVM writes the data to the log file before the temp-table gets deleted.
If you enable the TTStats parameter with a logging level of 3 or greater, and the startup parameter -ttindexrangesize is set to a value greater than 0, the AVM logs an entry that contains index statistics and includes the index name, and the procedure or class name. The AVM writes the data to the log file before the index of the temp-table gets deleted.
For more information on these startup parameters, see OpenEdge Deployment: Startup Command and Parameter Reference.
Log entry for temp-table statistics
The following example displays the log entry for temp-table statistics.
Table: ttCust (myproc.p)
Create: 10 Update: 5 Delete: 2 Read: 1 OS-Read: 2
Log entry for temp-table index statistics
The following example displays the log entry for temp-table index statistics.