Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 

Moving Data by Changing Partitioning Key Value


If a partition key value is changed, the changed instance can be moved to another partition by the partition expression.


The following example shows how to move the instance to another partition by changing the partition key value. If you change the sport event information of Hwang Young-Cho in the event1 partition from 'Athletics' to 'Football', the instance is moved to the event3 partition.

CREATE TABLE athlete2( name VARCHAR(40), event VARCHAR(30) )


PARTITION event1 VALUES IN ('Swimming', 'Athletics ' ),

PARTITION event2 VALUES IN ('Judo', 'Taekwondo','Boxing'),

PARTITION event3 VALUES IN ('Football', 'Basketball', 'Baseball')



INSERT INTO athlete2 VALUES ('Hwang Young-Cho', 'Athletics');

INSERT INTO athlete2 VALUES ('Lee Seung-Yuop', 'Baseball');


  name                  event


  'Hwang Young-Cho'     'Athletics'


UPDATE athlete2 SET event = 'Football' WHERE name = 'Hwang Young-Cho';


SELECT * FROM athlete2__p__event3;

  name                  event


  'Lee Seung-Yuop'      'Baseball'

  'Hwang Young-Cho'     'Football'


Be aware that when moving data between partitions by changing a partition key value, it can cause performance degradation due to internal deletions and insertions.