Get the App
SLTechnology News&Howtos  ›  Database  › 

The difference between binlog-format

Shulou Source: shulou.com Published: 2022-06-01 09:34:57 11月02日 Update

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.

Tags: Log format influence situation disk statement change different appropriate one line company just place finger server type service mixing selection Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Xiaomi NVidia Microsoft macOS