The GET_PREFS function is used to obtain the default value of a specified preference.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
DBMS_STATS.GET_PREFS (
pname IN VARCHAR2,
ownname IN VARCHAR2 DEFAULT NULL,
tabname IN VARCHAR2 DEFAULT NULL)
RETURN VARCHAR2;
Parameters
| Parameter | Description |
|---|---|
| pname | The name of the preference. |
| ownname | The username. If the username is set to NULL, the current login username will be used by default. |
| tabname | The table name. |
Exceptions
| Error code | Description |
|---|---|
| OBE-20000 | The resource manager is not enabled, and statistics cannot be collected simultaneously. |
| OBE-20001 | The input value is invalid. |
Example
Obtain the default value of the GRANULARITY parameter for the tbl1 table of the testUser01 user.
obclient> SELECT DBMS_STATS.GET_PREFS ('GRANULARITY','testUser01','tbl1') FROM DUAL;
+----------------------------------------------------------+
| DBMS_STATS.GET_PREFS ('GRANULARITY','testUser01','tbl1') |
+----------------------------------------------------------+
| AUTO |
+----------------------------------------------------------+
1 row in set
