Parallel Copy

Parallel copying
5.6 Open parallel copying
MySQL> STOP slave;
MySQL> SET = Global slave_parallel_workers. 4;
MySQL> Start slave;
core idea is: Table concurrent data submitted at different schema do not affect each other, i.e., slave nodes can be used to relay log in each assigned a different schema threads a SQL-like function,
to relay the transaction log replay has been submitted in the main library, keeping data consistent with the main library.

5.7 Open parallel copying
MySQL> STOP Slave;
MySQL> SET Global slave_parallel_workers =. 4;
MySQL> SET Global slave_parallel_type = 'LOGICAL_CLOCK';
MySQL> Start Slave;
in the MySQL 5.7, the introduction of Parallel replication group submitted (Enhanced Multi-threaded Slaves), set parameters slave_parallel_workers> 0 and global.slave_parallel_type = 'LOGICAL_CLOCK',
to the support of a schema, slave_parallel_workers a worker threads concurrently executing the main relay log database transaction submission.
The core idea: the transaction are submitted by a group of parallel playback (Group with the commit log binary);
Relay log Slave machine last_committed same transaction (different sequence_num) can execute concurrently.
Wherein the slave-parallel-type variable can have two values: DATABASE default values, based on parallel database replication; LOGICAL_CLOCK: Parallel group, filed replication

Guess you like

Origin www.cnblogs.com/allenhu320/p/11316288.html