Replication Formats •Disadvantages of row-based replication Advantages of statement-based replication •Proven technology. •Less data written to log files. When updates or deletes affect many rows, this results in  much  less storage space required for log files. This also means that taking and restoring from backups can be accomplished more quickly. •Log files contain all statements that made any changes, so they can be used to audit the database. Disadvantages of statement-based replication • Statements that are unsafe for SBR.  Not all statements which modify data (such as  INSERT DELETE ,  UPDATE , and  REPLACE  statements) can be replicated using statement-based replication. Any nondeterministic behavior is difficult to replicate when using statement-based replication. Examples of such Data Modification Language (DML) statements include the following: •A statement that depends on a loadable function or stored program that is nondeterministic, since the value returned by such a function or stored program or depends on factors other than the parameters supplied to it. (Row-based replication, however, simply replicates the value returned by the function or stored program, so its effect on table rows and data is the same on both the source and replica.) See Section 17.5.1.16, “Replication of Invoked Features” , for more information. • DELETE  and  UPDATE  statements that use a  LIMIT  clause without an  ORDER BY  are nondeterministic. See Section 17.5.1.18, “Replication and LIMIT” . •Locking read statements ( SELECT ... FOR UPDATE  and  SELECT ... FOR SHARE ) that use NOWAIT  or  SKIP LOCKED  options. See Locking Read Concurrency with NOWAIT and SKIP LOCKED. •Deterministic loadable functions must be applied on the replicas. •Statements using any of the following functions cannot be replicated properly using statement-based replication: • LOAD_FILE() • UUID() ,  UUID_SHORT() • USER() • FOUND_ROWS() • SYSDATE()  (unless both the source and the replica are started with the  --sysdate-is-now option) • GET_LOCK() • IS_FREE_LOCK() • IS_USED_LOCK() • MASTER_POS_WAIT() • RAND() 3586