ttStatsConfig
ttStatsConfig
built-in procedure controls statistics collection and parameters for the ttStats
utility. This procedure takes a name/value pair as input and outputs a single row result set corresponding to the name/value pair parameters.
Required Privilege
This procedure requires the ADMIN
privilege.
Usage in TimesTen Scaleout and TimesTen Classic
This procedure is supported in TimesTen Classic.
This procedure is supported in TimesTen Scaleout, but supports different parameter/value pairs than in TimesTen Classic.
In TimesTen Scaleout, this procedure broadcasts changes to all elements.
Related Views
This procedure has no related views.
Syntax
ttStatsConfig('param', [value], [option])
Parameters
ttStatsConfig
has the parameters:
Parameter | Type | Description |
---|---|---|
|
|
The name of the parameter to configure. |
|
|
The value of the specified parameter. If no value is supplied, the built-in procedure displays the current value for the specified parameter. |
|
|
The value of a second optional parameter, for example |
Parameter / Value Pairs
The supported parameter/value pairs in TimesTen Classic and TimesTen Scaleout are different. These are the supported parameter/value pairs:
TimesTen Classic
These parameter/value pairs can be set with TimesTen Classic:
Parameter | Value | Description |
---|---|---|
|
|
Specifies the frequency at which a specific connection is sampled.
|
|
|
Specifies the scope, The scope value determines at what level TimesTen should collect latch statistics:
The level value determines the level at which TimesTen collects statistics:
If latch statistics are enabled, TimesTen allocates around 100KB from temporary memory to store these statistics. Once you have configured the |
|
|
The existing SQL run time statistics are reset if the specified value is nonzero. |
|
|
The frequency at which a SQL command sample is taken. The default is |
|
|
Specifies the level of collection for database statistics. TimesTen stores theses statistics in system tables. Setting the The default setting of When the Setting the |
Note:
There are twottStatsConfig
calls that configure the collection of histogram data for SQL commands.
ttStatsConfig('SQLCmdSampleFactor', S)
enables SQL histogram collection for all connections and the frequency at which a SQL command sample is taken. The value of the sampling factorS
should be greater than 0.ttStatsConfig(;ConnSampleFactor', C, S)
enables SQL histogram collection for a connection to the database (C
) and the frequency at which a specific connection is sampled. The value of the sampling factorS
should be greater than 0.
If the sampling factor value is greater than 0 for both calls, then the value for ttStatsConfig('ConnSampleFactor', C, S)
takes precedence. If the sampling factor value is set to 0 for both parameters, then the sampling is turned off.
TimesTen Scaleout
These parameter/value pairs can be set with TimesTen Scaleout:
Parameter | Value | Description |
---|---|---|
|
|
The polling interval, in seconds, at which the The value of the polling interval does not affect the performance of the TimesTen Scaleout. However, a polling interval of 60 seconds tends to use six times more space than a polling interval of 10 seconds. Ensure that you have sufficient The default value is |
|
15<= |
The time, in minutes, that the The default value is |
|
|
The retention time interval, in days, at which the Ensure that you have sufficient The default value is |
Result Set
ttStatsConfig
returns the result set:
Column | Type | Description |
---|---|---|
|
|
The name of the parameter that was configured. |
|
|
The value of the specified parameter. If no value is supplied, the built-in procedure displays the current value for the specified parameter. |
Examples
Since TimesTen and TimesTen Scaleout support different parameter/value pairs, there are also different examples. These are supported examples:
TimesTen Classic
Sample every command:
Command> call ttStatsConfig('SqlCmdSampleFactor',1); < SQLCMDSAMPLEFACTOR, 1 > 1 row found.
Check sampling:
Command> call ttStatsConfig('SqlCmdSampleFactor'); < SQLCMDSAMPLEFACTOR, 1 > 1 row found.
Sample every fifth statement on connection 1.
Command> call ttStatsConfig('ConnSampleFactor', '1,5'); < CONNSAMPLEFACTOR, 1,5 > 1 row found.
Turn off sampling on connection 1.
Command> call ttStatsConfig('ConnSampleFactor', '1,0'); < CONNSAMPLEFACTOR, 1,0 > 1 row found.
Check data store statistics collection level.
Command> call ttstatsconfig('StatsLevel'); < STATSLEVEL, TYPICAL > 1 row found.
Turn off data store statistics collection.
Command> call ttstatsconfig('StatsLevel','None'); < STATSLEVEL, NONE > 1 row found.
TimesTen Scaleout
Sets the polling interval of statistics to 45 seconds. Therefore, the ttStats
daemon aggregates statics every 45 seconds:
Command> call ttStatsConfig('pollsec', 45); < POLLSEC, 45 > 1 row found.
Sets the time interval when the ttStats
daemon purges raw metrics to 60 minutes:
Command> call ttStatsConfig('retainMinutes', 60); < RETAINMINUTES, 60 > 1 row found.
Sets the retention time interval for statistics to 30 days:
Command> call ttStatsConfig('retentionDays', 30); < RETENTIONDAYS, 30 > 1 row found.
See Also