O'Reilly logo

Oracle SQL: the Essential Reference by David C. Kreines

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CREATE/ALTER/DROP CLUSTER
						
						
						
						CREATE CLUSTER [schema.]clustername 
  (column
						datatype[, column  datatype ...])
  [Physical_Attributes_Clause]
  [SIZE integer [K | M]]
  [TABLESPACE tsname]
  [STORAGE Storage_Clause]
  [INDEX]
  [[SINGLE TABLE] HASHKEYS integer HASH IS expression]
  [{PARALLEL [integer] | NOPARALLEL}]
  [CACHE | NOCACHE]

Creates a cluster, which is a schema object containing one or more tables with one or more columns in common.

ALTER CLUSTER [schema.]clustername
[SIZE integer[K | M]]
[Physical_Attributes_Clause]
[STORAGE Storage_Clause]
[{PARALLEL [integer] | NOPARALLEL}]
[ALLOCATE EXTENT 
 (EXTSIZE integer[K | M] [DATAFILE 'filename'] [INSTANCE integer])]

Redefines future storage allocations or allocates an extent for a cluster.

DROP CLUSTER [schema.]clustername
[INCLUDING TABLES]
[CASCADE CONSTRAINTS]

Removes a cluster from the database.

Keywords

cluster_name

Specifies the name of the cluster.

column

Specifies the name of the column that defines the cluster key.

datatype

Specifies the datatype of the column.

PCTUSED

Changes the minimum percentage of used space that Oracle will maintain in each block. Values can range from 0 to 99, and the default is 40.

PCTFREE

Changes the percentage of space kept free for future updates to the rows contained in this cluster. Values can range from 0 to 99, and the default is 10.

INITTRANS

Changes the number of transaction entries allocated to each block in the cluster. Values can range from 1 to 255, but should not normally be changed from the default ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required