The SET_GLOBAL_PREFS procedure is used to set global statistics preferences.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
DBMS_STATS.SET_GLOBAL_PREFS (
pname IN VARCHAR2,
pvalue IN VARCHAR2);
Parameters
| Parameter | Description |
|---|---|
| pname | The name of the preference. |
| pvalue | The value of the preference. |
Exceptions
| Error code | Description |
|---|---|
| OBE-20000 | Insufficient privileges. |
| OBE-20001 | Invalid value or illegal input value. |
Considerations
To call this procedure, you must have the
SYSDBAprivilege.Both parameters of this procedure are of the
VARCHAR2type. You must enclose their values in quotation marks.
Examples
Set the default value of the APPROXIMATE_NDV preference at the global level to FALSE.
obclient> CALL DBMS_STATS.SET_GLOBAL_PREFS ('APPROXIMATE_NDV', 'FALSE');
Query OK, 0 rows affected
