Home > database >  How to realize the insert in GBASE - select the source table data random distribution is inserted in
How to realize the insert in GBASE - select the source table data random distribution is inserted in

Time:03-29

Used GBASE - 8 a classmate should all probably know distribution state of GBASE table, sometimes due to the uneven distribution will table data skew and impact performance,
Directly to a random table dump will be in accordance with the distribution of the source table is consistent, so how to enforce randomly distributed dump?
Using the following methods, first gccli connection into the parameter c, SQL to add hint control at the same time,
Eg:
Gccli - ugbase - PXXXXX - c
Gbase> Insert into the target table select * from (select/* + grouped (' 1 ') */* from the source table) t;

Another, about random table data into a parameter control, are as follows:
Gcluster_random_insert
Is used to control the random distribution table in an insert value, when there is a single cluster nodes and data distribution to the stand-alone principle,
0: insert the fall in the value data and a cluster nodes on the same single;
1: insert the value into each of the data, using the random () % fragmentation principle, random on any single node,
  • Related