ttSize
ttSize
prints size information for all tables of the given table name. The size information includes space occupied by any indexes defined on the table.
The memory required for varying-length columns is estimated by using the average length of the columns in the current table as the average length of the columns in the final table. If there are no rows in the current table, then ttSize
assumes that the average column length is one half the maximum column length.
The memory required for LOB columns is estimated by using the average length of the columns in the current table as the average length of the columns in the final table. When no rows are being inserted into the table, computations do not include LOB columns.
The table is scanned when this utility is called. Avoid the scan of the table by specifying an optional non-NULL
frac
value, which should be between 0
and 1
. The ttSize
utility uses this value to estimate the average size of varying-length columns. The maximum size of each varying-length column is multiplied by the frac
value to compute the estimated average size of VARBINARY
or VARCHAR
columns. If the frac
option is not specified, the existing rows in the table are scanned and the average length of the varying-length columns in the existing rows is used. If frac
is not specified and the table has no rows in it, then frac
is assumed to have the value 0.5
.
Required Privilege
This utility requires no privileges beyond those needed to perform select operations on the specified database objects.
Usage in TimesTen Scaleout and TimesTen Classic
This utility is supported in both TimesTen Classic and TimesTen Scaleout.
Syntax
ttSize {-h | -help | -?} ttSize {-V | -version} ttSize -tbl [owner.][tableName] [-rows rows] [- frac fraction] {-connStr connection_string | DSN}
Options
ttSize
has the options:
Option | Description |
---|---|
|
An ODBC connection string that specifies a database location, driver, and optionally other connection attribute settings. |
|
Specifies the name of a data source to which |
|
Specifies the estimated average fraction of out-of-line |
|
Prints a usage message and exits. |
|
Specifies the name of the table whose definition should be used for size estimation. If the owner is omitted, the login name of the user is tried. If that is not found, the user |
|
Specifies the expected number of rows in the table. Space required to store a TimesTen table includes space for the actual data, plus overhead for bookkeeping, dynamic memory allocation and indexes. TimesTen may consume additional space due to memory fragmentation, temporary space allocated during query implementation and space to hold compiled SQL statements. If this option is omitted, the |
|
Prints the release number of |
Examples
To estimate the space required for a table, create the table in TimesTen, populate it with a sample of representative rows, create desired indexes and runttSize
with those definitions. For example, to estimate the size of the NAMEID
table in the data source FixedDs
when it grows to 200,000 rows, run:
% ttSize -tbl Nameid -rows 200000 FixedDs Rows = 200000 Total in-line row bytes = 7139428 Total = 7139428
Notes
-
LOB columns are treated similar to var-type columns, unless there are no rows being inserted into the table. The average size computation does not include LOB columns in such cases.
-
The columns
PERM_ALLOCATED_SIZE
andPERM_IN_USE_SIZE
show the currently allocated size of the database (in KB units) and the in-use size of the database. The system updates this information each time a connection is made or released and each time a transaction is committed or rolled back. -
This utility is supported only for TimesTen Data Manager DSNs and not for TimesTen Client DSNs.