Skip to main content

SET_MVREF_STATS_PARAMS

SET_MVREF_STATS_PARAMS is used to configure the collection level and data retention period for collecting statistics during materialized view refreshes.

Syntax

PROCEDURE set_mvref_stats_params(
IN mv_name VARCHAR(65535),
IN collection_level VARCHAR(65535) DEFAULT NULL,
IN retention_period INT DEFAULT NULL);

Parameters

ParameterDescription
mv_nameThe name of the materialized view.
  • If this parameter is set to NULL, the operation applies to all materialized views.
collection_levelThe collection level of statistics. The default value is TYPICAL. Valid values:
  • NONE: Do not collect statistics.
  • TYPICAL: Collect basic refresh statistics.
  • ADVANCED: Collect detailed refresh statistics.
  • NULL: Use the default value, TYPICAL.
retention_periodThe number of days for which statistics are retained. Valid value: 1 to 365000. Statistics are automatically deleted after the specified number of days. The default value is 31 days.
  • If this parameter is set to NULL, the default value is used.
  • If this parameter is set to -1, statistics are permanently retained.