The difference between binlog-format
Which log format should be used for the primary server?
There are statement,row and mixed3 species, and mixed refers to the mixture of the first two species.
Take insert into xxtable values as an example
Impact: 1 row, and 1 new row, no effect on other rows.
In this case, use the row format to directly copy the new changes on 1 line on the disk.
With update xxtable set age=21 where name='sss'
In general, this situation only affects one line. It is also appropriate to use row.
In order to give out red envelopes for the Spring Festival, the whole company will get a salary increase of 100 yuan.
Update xxtable set salary=salary+100
The impact of this statement is for each line, so a lot of row on disk has changed.
Here, it is suitable for logs in statment format.
Two kinds of logs, each with its own efficiency, mysql provides the mixed type.
You can automatically choose the appropriate log format according to the statement.