Updates attributes on an existing cluster.
ALTER CLUSTER <cluster> <attribute-name> <attribute-value>
<cluster>Defines the cluster you want to change. You can use its logical name or ID. Beginning with version 2.2, you can use the wildcard
*to update multiple clusters together.
<attribute-name>Defines the attribute you want to change. For a list of supported attributes, see the table below.
<attribute-value>Defines the value you want to set.
Change the name of a cluster, using its name:
ALTER CLUSTER profile NAME "profile2"
IMPORTANT: cluster name, status, compression, conflictstrategy are strings, so they have to be "quoted"
Change the name of a cluster, using its ID:
ALTER CLUSTER 9 NAME "profile2"
Update the cluster conflict strategy to
ALTER CLUSTER V CONFLICTSTRATEGY "automerge"
ALTER CLUSTER V_2012 STATUS "OFFLINE"
Update multiple clusters with a similar name:
ALTER CLUSTER employee* status "offline"
|String||Changes the cluster name.|
|String||Changes the cluster status. Allowed values are |
|String||2.0+||Defines the strategy it uses to handle conflicts in the event that OrientDB MVCC finds an update or a delete operation it executes against an old record. If you don't define a strategy at the cluster-level, it uses the database-level configuration. For more information on supported strategies, see the section below.|
Note: from version 3.x attributes
RECORD_OVERFLOW_GROW_FACTORare no longer supported.
|Throws an exception when versions are different. This is the default setting.|
|In the event that the versions are different, it checks for changes in the content, otherwise it uses the highest version to avoid throwing an exception.|
|Merges the changes.|
To know more about other SQL commands, take a look at SQL Commands.