The CREATE_STAT_TABLE procedure creates a table in the specified user for storing statistics.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
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 login username is used by default. |
| stattab | The name of the statistics user table to be created. |
| tblspace | The name of the tablespace where the newly created statistics user table 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 |
|---|---|
| OBE-20000 | The table does not exist or the permissions are insufficient. |
| OBE-20001 | The tablespace does not exist. |
Considerations
You must have the required privileges to create a table in the specified user.
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
