The CREATE_STAT_TABLE procedure is used to create a table in the specified schema for storing statistics.
Syntax
DBMS_STATS.CREATE_STAT_TABLE(
ownname VARCHAR2,
stattab VARCHAR2,
tblspace VARCHAR2 DEFAULT NULL,
global_temporary BOOLEAN DEFAULT FALSE);
Parameters
Parameter |
Description |
|---|---|
| ownname | Username. If the username is set to NULL, the current login username will be used by default. |
| stattab | The name of the user table for which you want to create statistics. |
| tblspace | The name of the tablespace where the user table for the new statistics is located. If this parameter is not specified, the default tablespace of the user is used. |
| global_temporary | Note: This parameter is not supported in the current version. |
Exceptions
Error Code |
Description |
|---|---|
| HY000 |
|
Usage instructions
You must have the required privileges to create a table in the specified schema to call this procedure.
Examples
Create a statistics user table named test_stat for the user testUser01.
obclient> CALL DBMS_STATS.CREATE_STAT_TABLE('testUser01', 'test_stat');
Query OK, 0 rows affected