The CREATE_STAT_TABLE procedure creates a table in the specified schema to store statistics.
Syntax
DBMS_STATS.CREATE_STAT_TABLE(
ownname VARCHAR2,
stattab VARCHAR2,
tblspace VARCHAR2 DEFAULT NULL,
global_temporary BOOLEAN DEFAULT FALSE);
Parameters
| Parameter | Description |
|---|---|
| ownname | The username. If the username is set to NULL, the current logon username is used by default. |
| stattab | The name of the user statistics table to be created. |
| tblspace | The name of the tablespace where the user statistics table to be created resides. If you do not specify this parameter, the default tablespace is used. |
| global_temporary | Note: The current version does not support this parameter. |
Exceptions
| Error code | Description |
|---|---|
| HY000 |
|
Considerations
To call this procedure, you must have the privilege to create a table in the specified schema.
Examples
Create the user statistics table test_stat for the testUser01 user.
obclient> CALL DBMS_STATS.CREATE_STAT_TABLE('testUser01', 'test_stat');
Query OK, 0 rows affected