TSContainerPctUsed function

The TSContainerPctUsed function returns the percentage of space that is used in the specified container or in all containers.

Syntax

TSContainerPctUsed(container_name  varchar(128,1));
TSContainerPctUsed(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 percentage of the used space:
0 = The partitions in the active window
1 = The partitions in the dormant window
2 = The container partition.
3 = All partitions.

Description

Use the TSContainerPctUsed function to view the percentage of used space in a container or in all containers. For rolling window containers, the TSContainerPctUsed function returns the percentage of the space in the specified set of partitions that is used.

Returns

The percentage of used space.

Example

The following statement returns the percentage of used space in the container named mult_container:

EXECUTE FUNCTION TSContainerPctUsed("mult_container");

 percent 

  60.000

1 row(s) retrieved.

The following statement returns the percentage of used space in all containers:

EXECUTE FUNCTION TSContainerPctUsed(NULL);

 percent 

  93.545

1 row(s) retrieved.