Health, Diagnostics & Performance
The procedures in this section help validate cube health, collect diagnostic information, review licensing capacity, analyze query performance, and evaluate physical optimization recommendations.
HEALTH_CHECK
Section titled “HEALTH_CHECK”Minimum role: CUBE_PUBLIC
HEALTH_CHECK(P_CUBE_NAME) -> TABLEValidates cube configuration, structures, and formulas.
Parameters
Section titled “Parameters”| Parameter | Type | Req/Opt | Description |
|---|---|---|---|
P_CUBE_NAME |
VARCHAR |
opt | Cube to check. Pass NULL to check every cube. |
Returns
Section titled “Returns”Returns:
CUBE_NAMEDIM_NAMECHECK_TYPESTATUSMESSAGE
Checks include DIMENSION_TABLE, DIMENSION_ROW_COUNT, INPUT_TABLE_CONFIG, QUERY_FUNCTION, SHARED_TABLE, DATA_FRESHNESS, CONFIG_INTEGRITY, FORMULA_SYNTAX, FORMULA_BRACKETS, FORMULA_CASE_END, FORMULA_EMPTY, FORMULA_NO_DIMENSION, FORMULA_DIVISION_SAFETY, FORMULA_ESSBASE_SYNTAX, FORMULA_COUNT, and STALE_AI_AGENT.
Example
Section titled “Example”Run a health check:
CALL CUBE.HEALTH_CHECK('FINANCE');Show only non-OK results:
SELECT *FROM TABLE(RESULT_SCAN(LAST_QUERY_ID()))WHERE STATUS <> 'OK';GENERATE_SUPPORT_INFO
Section titled “GENERATE_SUPPORT_INFO”Minimum role: CUBE_ADMIN
GENERATE_SUPPORT_INFO(P_CUBE_NAME) -> VARIANTCollects version, configuration, and application state into a diagnostic bundle.
Run this procedure when gathering information for a support request.
Parameters
Section titled “Parameters”| Parameter | Type | Req/Opt | Description |
|---|---|---|---|
P_CUBE_NAME |
VARCHAR |
opt | Cube name. Pass NULL for system-level information. |
Example
Section titled “Example”CALL CUBE.GENERATE_SUPPORT_INFO('FINANCE');GET_PLAN_INFO
Section titled “GET_PLAN_INFO”Minimum role: CUBE_ADMIN
GET_PLAN_INFO() -> OBJECTReports the licensing position of the current installation.
This procedure takes no parameters.
Returns
Section titled “Returns”Returns:
ACCOUNT_IDENTIFIERACCOUNT_NAMEORGANIZATION_NAMEPLAN_TIERCUBES_ALLOWEDCUBES_USEDCUBES_REMAININGSUPPORT_CONTACT
Check CUBES_REMAINING before a migration that will create multiple cubes. Cube creation fails after the installation’s cube allowance has been used.
Example
Section titled “Example”CALL CUBE.GET_PLAN_INFO();PERFORMANCE_REPORT
Section titled “PERFORMANCE_REPORT”Minimum role: CUBE_ADMIN
PERFORMANCE_REPORT( P_CUBE_NAME, P_DAYS) -> VARIANTAnalyzes query performance for a cube over a specified period.
Parameters
Section titled “Parameters”| Parameter | Type | Req/Opt | Description |
|---|---|---|---|
P_CUBE_NAME |
VARCHAR |
req | Cube name. |
P_DAYS |
VARCHAR |
opt | Number of days to analyze. |
Example
Section titled “Example”CALL CUBE.PERFORMANCE_REPORT( 'FINANCE', '30');SLOW_QUERY_INSPECTOR
Section titled “SLOW_QUERY_INSPECTOR”Minimum role: CUBE_ADMIN
SLOW_QUERY_INSPECTOR( P_CUBE_NAME, P_LIMIT, P_DAYS, P_SLOW_MS) -> VARIANTIdentifies the slowest queries and suggests changes that may improve performance.
Parameters
Section titled “Parameters”| Parameter | Type | Req/Opt | Description |
|---|---|---|---|
P_CUBE_NAME |
VARCHAR |
opt | Cube name. Pass NULL for all cubes. |
P_LIMIT |
VARCHAR |
opt | Maximum number of queries to return. |
P_DAYS |
VARCHAR |
opt | Lookback period in days. |
P_SLOW_MS |
VARCHAR |
opt | Threshold in milliseconds for a query to be considered slow. |
Example
Section titled “Example”CALL CUBE.SLOW_QUERY_INSPECTOR( 'FINANCE', '20', '7', '5000');RECOMMEND_CLUSTERING
Section titled “RECOMMEND_CLUSTERING”Minimum role: CUBE_ADMIN
RECOMMEND_CLUSTERING( P_CUBE_NAME, P_DATA_TABLE, P_MIN_QUERIES, P_APPLY) -> VARIANTAnalyzes actual query history and recommends clustering keys for cube data tables.
Parameters
Section titled “Parameters”| Parameter | Type | Req/Opt | Description |
|---|---|---|---|
P_CUBE_NAME |
VARCHAR |
opt | Cube name. |
P_DATA_TABLE |
VARCHAR |
opt | Specific data table to analyze. |
P_MIN_QUERIES |
VARCHAR |
opt | Minimum query count before making a recommendation. |
P_APPLY |
VARCHAR |
opt | Pass 'TRUE' to apply the recommendations. Omit to report only. |
By default, the procedure reports recommendations without changing anything.
Example
Section titled “Example”CALL CUBE.RECOMMEND_CLUSTERING( 'FINANCE', NULL, NULL, NULL);RECOMMEND_SEARCH_OPTIMIZATION
Section titled “RECOMMEND_SEARCH_OPTIMIZATION”Minimum role: CUBE_ADMIN
RECOMMEND_SEARCH_OPTIMIZATION( P_CUBE_NAME, P_DATA_TABLE, P_MIN_QUERIES, P_APPLY) -> VARIANTAnalyzes actual query history and recommends Snowflake search optimization for cube data tables.
Parameters
Section titled “Parameters”| Parameter | Type | Req/Opt | Description |
|---|---|---|---|
P_CUBE_NAME |
VARCHAR |
opt | Cube name. |
P_DATA_TABLE |
VARCHAR |
opt | Specific data table to analyze. |
P_MIN_QUERIES |
VARCHAR |
opt | Minimum query count before making a recommendation. |
P_APPLY |
VARCHAR |
opt | Pass 'TRUE' to apply the recommendations. Omit to report only. |
By default, the procedure reports recommendations without changing anything.
Example
Section titled “Example”CALL CUBE.RECOMMEND_SEARCH_OPTIMIZATION( 'FINANCE', NULL, NULL, NULL);