ttSQLExecutionTimeHistogram
The ttSQLExecutionTimeHistogram built-in procedure returns a histogram of SQL execution times for either a single SQL command or all SQL commands if command cache sampling is enabled.
Required Privilege
This procedure requires the ADMIN privilege.
Syntax
ttSQLExecutionTimeHistogram(sqlCmdID)Parameters
ttSQLExecutionTimeHistogram has the optional parameter:
| Parameter | Type | Description |
|---|---|---|
|
|
|
The unique identifier of a SQL command in the TimesTen command cache. If no value is supplied displays information about all current commands in the TimesTen command cache. |
Result Set
ttSQLExecutionTimeHistogram returns the result set:
| Column | Type | Description |
|---|---|---|
|
|
|
The number of SQL command execution time operations have been measured since either the database was started or the ttStatsConfig built-in procedure was used to reset the statistics. |
|
|
|
The accumulated wall clock execution time when sampling in seconds. |
|
|
|
The upper limit in seconds of execution time. |
|
|
|
The number of SQL commands with time less than or equal to |
Examples
The following example shows the output for the ttSQLExecutionTimeHistogram built-in procedure:
The following example of the ttSQLExecutionTimeHistogram built-in procedure shows that a total of 1919 statements run. The total time for all 1919 statements to run was 1.090751 seconds. This example shows that SQL statements ran in the following time frames:
-
278 statements run in a time frame that was less than or equal to 0.00001562 seconds.
-
1484 statements run in a time frame that was greater than 0.00001562 seconds and less than or equal to 0.000125 seconds.
-
35 statements run in a time frame that was greater than 0.000125 seconds and less than or equal to 0.001 seconds.
-
62 statements run in a time frame that was greater than 0.001 seconds and less than or equal to 0.008 seconds.
-
60 statements run in a time frame that was greater than 0.008 seconds and less than or equal to 0.064 seconds.
Command> call ttSQLExecutionTimeHistogram; < 1919, 1.090751, .00001562, 278 > < 1919, 1.090751, .000125, 1484 > < 1919, 1.090751, .001, 35 > < 1919, 1.090751, .008, 62 > < 1919, 1.090751, .064, 60 > < 1919, 1.090751, .512, 0 > < 1919, 1.090751, 4.096, 0 > < 1919, 1.090751, 32.768, 0 > < 1919, 1.090751, 262.144, 0 > < 1919, 1.090751, 9.999999999E+125, 0 > 10 rows found.
See Also