TSContainerTotalPages function

The TSContainerTotalPages function returns the total number of pages that are allocated to the specified container or in all containers.

Syntax

TSContainerTotalPages(container_name  varchar(128,1));
TSContainerTotalPages(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 pages that are allocated:
0 = The partitions in the active window
1 = The partitions in the dormant window
2 = The container partition.
3 = All partitions.

Description

Use the TSContainerTotalPages function to view the size of a container or all containers. For rolling window containers, the TSContainerTotalPages function returns the sum of size of the specified set of partitions.

Returns

The number of allocated pages.

Example

The following statement returns the number of pages that are allocated to the container named mult_container:

EXECUTE FUNCTION TSContainerTotalPages("mult_container");

      total 

         50

1 row(s) retrieved.

The following statement returns the number of pages allocated to all the containers:

EXECUTE FUNCTION TSContainerTotalPages(NULL);

      total 

       2169

1 row(s) retrieved.