CREATE VOLATILE TABLESPACE
CREATE VOLATILE TABLESPACE#
Syntax#
create_volatile_tablespace ::=#
initsize_clause ::=#
autoextend_clause ::=#
maxsize_clause ::=#
Prerequisites#
Only the SYS user and users having the CREATE TABLESPACE system privilege can create tablespaces.
Description#
The CREATE VOLATILE TABLESPACE statement is used to create a volatile tablespace for storing database objects in the database. Tablespaces created using this command are used to hold volatile tables.
VOLATILE#
This keyword is used to specify that the tablespace to be created will be a volatile tablespace.
DATA#
This keyword is used to specify that the tablespace to be created will be used to store user data. A data tablespace is created even when the CREATE TABLESPACE statement is executed without the DATA keyword.
tablespace_name#
This is used to specify the name of the tablespace to create. Refer to "Rules for Object Names" in Chapter 2 for more information on specifying names.
initsize_clause#
This is used to specify the initial size of the tablespace to create.
SIZE#
This is used to specify the initial size of a tablespace. The size can be specified in kB (kilobytes, expressed as "K"), MB (megabytes, expressed as "M") or GB (gigabytes, expressed as "G"). If no units are specified, the default unit is kilobytes.
For example, if the EXPAND_CHUNK_PAGE_COUNT property is set to 128, the default allocation size would be 128 * 32 = 4 MB. Therefore, the initial size must be set to a multiple of 4 MB.
This value can be specified in units of Kilobytes (K), Megabytes (M), or Gigabytes (G). If no unit is specified, the default unit is in kilobytes.
autoextend_clause#
This is used to specify whether the tablespace automatically increases in size when necessary, and the maximum size to which it can increase. If this clause is omitted, AUTOEXTEND is disabled by default.
ON#
This enables the AUTOEXTEND option.
OFF#
This disables the AUTOEXTEND option.
NEXT#
This is used to specify the increment by which the tablespace increases in size when it is automatically increased in size.
Note that the initial size of the memory tablespace must be a multiple of this increment.
If AUTOEXTEND is enabled but this value is not set, the default is the value set using the EXPAND_CHUNK_PAGE_COUNT property in the altibase.properties file. If AUTOEXTEND is OFF, this value is meaningless.
The size can be specified in kB (kilobytes, expressed as "K"), MB (megabytes, expressed as "M") or GB (gigabytes, expressed as "G"). If no units are specified, the default unit is kilobytes.
maxsize_clause#
This is used to specify the maximum size to which a tablespace can increase when it automatically increases in size.
If AUTOEXTEND is enabled but this value is not set, the default value is UNLIMITED. If AUTOEXTEND is OFF, this value is meaningless.
The size can be specified in kB (kilobytes, expressed as "K"), MB (megabytes, expressed as "M") or GB (gigabytes, expressed as "G"). If no units are specified, the default unit is kilobytes.
UNLIMITED#
This is used to indicate that there is no upper limit to the size to which the tablespace can increase.
If this option is used, the tablespace will automatically increase in size up to the point at which the total size of all memory tablespaces and all volatile tablespaces in the system reaches the size specified in the MEM_MAX_DB_SIZE property in the altibase.properties file.
Examples#
<Query 1> Create a user-defined volatile data tablespace that is initially 512 MB in size and does not automatically increase in size.
iSQL> CREATE VOLATILE DATA TABLESPACE user_data SIZE 512M;
Create success.
<Query 2> Create a user-defined volatile data tablespace that is initially 512 MB in size and increases in size in 128 MB increments.
iSQL> CREATE VOLATILE DATA TABLESPACE user_data SIZE 512M AUTOEXTEND ON NEXT
128M;
Create success.