ifx_listMarts() function

The ifx_listMarts() function returns a set of unnamed rows that contain the status for all the data marts in an accelerator.

Syntax


1  ifx_listMarts ( ' accelerator_name ' )
accelerator_name
The name of the accelerator.

Usage

The ifx_listMarts() function returns a set of unnamed rows that contain the status for each data mart in an accelerator. The content of the rows is the same as the ifx_getMartStat() function, which returns the status of a single data mart.

Each row corresponds to one data mart. The rows have the following columns:

name
The name of the data mart.
status
The status of the data mart. The status can have one of the following values:
Active
The data mart is available for query processing. You cannot use the loadMart() function to load the data mart when the data mart is in the Active state.
LoadInProgress
The data mart is being loading with data. It is not yet available for query processing.
LoadPending
The data mart has been defined successfully, but it is not yet being loading with data. It is not available for query processing.
Disabled
The data mart is deactivated. It is not available for query processing.
memory
The memory that is consumed by the data mart in MB.
lastload
The timestamp of last time that the data mart was loaded successfully.

Examples

The following example shows how to retrieve the set of unnamed rows that contain the status for all the data marts in an accelerator.

EXECUTE FUNCTION ifx_listMarts('MyAccelerator');

The following example shows how to convert the returned result set into a table expression.

SELECT c.* FROM TABLE(ifx_listMarts('MyAccelerator')) (c);

The following example shows how to count the number of data marts, and then group them by status.

SELECT c.status,count(*) FROM TABLE(ifx_listMarts('MyAccelerator')) (c)
        group by 1;

The following example shows how to calculate the amount of memory that has been used by the data marts that have been loaded within the last seven days.

SELECT sum(c.memory) FROM TABLE(ifx_listMarts('MyAccelerator')) (c)
        where c.lastload > TODAY - 7;