>>-ALTER OPTICAL CLUSTER--+-------+--cluster_name---------------> '-owner-' >--| CLUSTERSIZE Clause |-------------------------------------->< CLUSTERSIZE Clause: .-500---------. |--CLUSTERSIZE--+-------------+---------------------------------| '-clustersize-'
Element | Purpose | Restrictions | Syntax |
---|---|---|---|
cluster_name | The name of the cluster to alter | The cluster name must already exist. | Identifier segment; see IBM Informix: Guide to SQL Syntax |
clustersize | Size of the cluster, in kilobytes, to be reserved for each unique cluster-key value | Clustersize must be less than the volume size. | Literal Number segment; see IBM Informix: Guide to SQL Syntax |
owner | The user name of the owner of the cluster | The specified name must be a valid user name. | Identifier segment; see IBM Informix: Guide to SQL Syntax |
To alter an optical cluster, you must be the owner of the cluster, have the Index privilege on the table, or have the DBA privilege.
In the following example, the CREATE OPTICAL CLUSTER statement creates cat_clstr, an optical cluster of 6,000 kilobytes for the cat_picture column in the catalog table. For each unique value of stock_num in the table, cat_clstr stores the associated data for this column. The following example changes the amount of space allocated for each cat_clstr from 6,000 kilobytes to 8,000 kilobytes. This change affects all clusters created after the ALTER OPTICAL CLUSTER statement is executed. Clusters created prior to an ALTER OPTICAL CLUSTER statement maintain their original size.
CREATE OPTICAL CLUSTER cat_clstr FOR catalog (cat_picture) ON (stock_num CLUSTERSIZE 6000 ALTER OPTICAL CLUSTER cat_clstr CLUSTERSIZE 8000
Related statements: CREATE OPTICAL CLUSTER and DROP OPTICAL CLUSTER