TSContainerTotalUsed function

The TSContainerTotalUsed function returns the total number of pages that contain time series data in the specified container or in all containers.

Syntax

TSContainerTotalUsed(container_name  varchar(128,1));
TSContainerTotalUsed(container_name  varchar(128,1),
                     rw_flag         integer default 0);
container_name
Specifies which container to return information about. Must be an existing container name. You can include wildcard characters from the MATCHES operator: *, ?, [...], \, ^. The function returns information for all containers that have names that match the expression. See MATCHES Operator.
The value NULL returns information about all containers for the database.
rw_flag
For rolling window containers, specifies for which partitions to return the sum of the total number of pages that contain time series elements:
0 = The partitions in the active window
1 = The partitions in the dormant window
2 = The container partition.
3 = All partitions.

Description

Use the TSContainerTotalUsed function to view the amount of data in a container or in all containers. For rolling window containers, the TSContainerTotalUsed function returns the sum of the amount of data in the specified set of partitions.

Returns

The number of pages that contain time series data.

Example

The following statement returns the number of pages that are used by time series data in the container named mult_container:

EXECUTE FUNCTION TSContainerTotalUsed("mult_container");

      pages 

         30

1 row(s) retrieved.

The following statement returns the number of pages that are used by time series data in all containers:

EXECUTE FUNCTION TSContainerTotalUsed(NULL);

      pages 

       2029

1 row(s) retrieved.