2014/04/23

mysql binlog_row_image

In MySQL row-based replication, each row change event contains two images, a “before” image whose columns are matched against when searching for the row to be updated, and an “after” image containing the changes.
Normally, MySQL logs full rows (that is, all columns) for both the before and after images. However, it is not strictly necessary to include every column in both images, and we can often save disk, memory, and network usage by logging only those columns which are actually required.
For the before image, it is necessary only that the minimum set of columns required to uniquely identify rows is logged.
In the after image, it is necessary to log only the columns which have actually changed.



    full: Log all columns in both the before image and the after image.

    minimal: Log only those columns in the before image that are required to identify the row to be changed; log only those columns in the after image that are actually changed.

    noblob: Log all columns (same as full), except for BLOB and TEXT columns that are not required to identify rows, or that have not changed.
   
■条件付けだね。。
Setting this variable has no effect when the binary logging format is STATEMENT
じゃ。logging formatを「MIX」にして、
Optimized Row Based Replication

By only replicating those elements of the row image that have changed following INSERT, UPDATE and DELETE operations, replication throughput for both the master and slave(s) can be increased while binary log disk space, network resource and server memory footprint are all reduced.
スレーブとマスターのデータは、同じ順番であることが必要。。
その保証が難しい。