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.
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
These parameter/value pairs can be set with TimesTen:
| 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 factorSshould 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 factorSshould 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.
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
These are supported examples:
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.See Also