The SET_TABLE_PREFS procedure is used to set the statistics preferences for a table owned by a specified user.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
DBMS_STATS.SET_TABLE_PREFS (
ownname IN VARCHAR2,
tabname IN VARCHAR2,
pname IN VARCHAR2,
pvalue IN VARCHAR2);
Parameters
| Parameter | Description |
|---|---|
| ownname | The username. If the username is set to NULL, the current login username is used by default. |
| tabname | The table name. |
| pname | The name of the preference. |
| pvalue | The value of the preference. |
Exceptions
| Error Code | Description |
|---|---|
| OBE-20000 | The object does not exist or the user does not have sufficient privileges. |
| OBE-20001 | Invalid value or illegal input value. |
Considerations
To run this procedure, you must connect as the specified user or have the
SYSDBAprivilege.All parameters in this procedure are of the
VARCHAR2type, and their values must be enclosed in quotes.
Examples
Set the default value of the DEGREE preference for the collection strategy of the tbl1 table owned by the testUser01 user to 128.
obclient> CALL DBMS_STATS.SET_TABLE_PREFS('testUser01', 'tbl1', 'DEGREE', '128');
Query OK, 0 rows affected
