The SET_TABLE_PREFS procedure is used to set the statistics preferences for tables owned by a specified user.
Syntax
DBMS_STATS.SET_TABLE_PREFS (
ownname IN VARCHAR2,
tabname IN VARCHAR2,
pname IN VARCHAR2,
pvalue IN VARCHAR2);
Parameters
Parameter |
Description |
|---|---|
| ownname | Username. If the username is set to NULL, the current login username will be used by default. |
| tabname | Table name. |
| pname | The name of the Prefs. |
| pvalue | The value of Prefs. |
Exceptions
Error Code |
Description |
|---|---|
| HY000 |
|
Usage instructions
To run this procedure, you must be connected as the specified user or have the
SYSDBAprivilege.All parameters in this process are of the
VARCHAR2type, and their values must be enclosed in quotes.
Examples
Set the default value of DEGREE for the collection strategy of table tbl1 for user testUser01 to 128.
obclient> CALL DBMS_STATS.SET_TABLE_PREFS('testUser01', 'tbl1', 'DEGREE', '128');
Query OK, 0 rows affected