The SET_TABLE_PREFS procedure sets the statistics preference for a table owned by the specified user.
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 NULL, the current login username is used. |
| tabname | The table name. |
| pname | The name of the preference. |
| pvalue | The value of the preference. |
Exceptions
| Error code | Description |
|---|---|
| HY000 |
|
Considerations
You must connect as the specified user or have the
SYSDBAprivilege to run this procedure.All parameters in this procedure are of the
VARCHAR2type and their values must be enclosed in quotes.
Examples
Set the default DEGREE value of the collection strategy for the tbl1 table of the testUser01 user to 128.
obclient> CALL DBMS_STATS.SET_TABLE_PREFS('testUser01', 'tbl1', 'DEGREE', '128');
Query OK, 0 rows affected
