ttLatchStatsGet

This procedure displays latch statistics. Statistics are useful for determining areas of contention in a running system.

This procedure is primarily meant to be used when requested by TimesTen technical support.

Required Privilege

This procedure requires ADMIN privileges to show all active connections or database level statistics. No privileges are required to show the current connection's latch statistics.

Usage in TimesTen Scaleout and TimesTen Classic

This procedure is supported in TimesTen Classic.

TimesTen Scaleout applications can call this built-in procedure

In TimesTen Scaleout, this procedure runs locally on the element from which it is called.

Related Views

This procedure has no related views.

Syntax

ttLatchStatsGet (level, operation)

Parameters

ttLatchStatsGet has these parameters:

Parameter Type Description

level

TT_CHAR (16)

The level controls the number of connections for which the stats are printed. Valid values are:

db - All the active connections on the database.

conn - The current connection. This is the default.

connid - An specific connection (specified by connid).

operation

TT_CHAR (16)

This value controls the verbosity level of the output. Valid values are:

show - Only show the contention points that have a high contention level.

showall - Show the contention points that have contention.

showandtell - Show all the contention points.

Result Set

Results sets are divided into two types: contention point and statistics.

ttLatchStatsGet returns the result set for contention points. These describe the location of contention.

Column Type Description

callerName

TT_VARCHAR(40) NOT NULL

Function name containing the contention point.

fileName

TT_VARCHAR(30) NOT NULL

The file that contains the callerName function.

lineNo

TT_INTEGER NOT NULL

The line number of the fileName file.

description

TT_VARCHAR(100) NOT NULL

Description of this contention point.

ttLatchStatsGet returns the result set for statistics. These describe detailed statistics about this contention point:

Column Type Description

connName

TT_VARCHAR(32) NOT NULL

The name of the connection experiencing contention.

spinCount

TT_BIGINT NOT NULL

The number of times the connName connection has spun on this contention point.

access

TT_BIGINT NOT NULL

The number of times the connName connection has used this contention point.

sleepCnt

TT_INTEGER NOT NULL

The number of times the connName connection has slept on this contention point.

firstTry

TT_INTEGER NOT NULL

The number of times the connName connection has used this contention point without experiencing contention.

collisions

TT_INTEGER NOT NULL

The number of times the connName connection has used this contention point and experienced contention.

avgSpin

TT_BIGINT NOT NULL

The average number of times the connName connection has spun on this contention point.

Examples

The following example shows an example result set for a call to ttLatchStatsGet.

CALL ttLatchStatsGet(); 
< getSmallMed, heap.c 2675, Generic description, sampledb1, 
  1, 0, 1, 0, -1, -1, 0 >
< sbhpallocAttempt, heap.c 3712, Generic description, 
  sampledb1, 1, 0, 1, 0, -1, -1, 0 >

See Also