Replication and Binary Logging Options and Variables The size of the memory buffer for the binary log to hold nontransactional statements issued during a transaction. The value must be a multiple of 4096. When binary logging is enabled on the server (with the  log_bin  system variable set to ON), separate binary log transaction and statement caches are allocated for each client if the server supports any transactional storage engines. If the data for the nontransactional statements used in the transaction exceeds the space in the memory buffer, the excess data is stored in a temporary file. When binary log encryption is active on the server, the memory buffer is not encrypted, but (from MySQL 8.0.17) any temporary file used to hold the binary log cache is encrypted. After each transaction is committed, the binary log statement cache is reset by clearing the memory buffer and truncating the temporary file if used. If you often use large nontransactional statements during transactions, you can increase this cache size to get better performance by reducing or eliminating the need to write to temporary files. The Binlog_stmt_cache_use  and  Binlog_stmt_cache_disk_use  status variables can be useful for tuning the size of this variable. See Section 5.4.4, “The Binary Log” . The  binlog_cache_size  system variable sets the size for the transaction cache. Enables compression for transactions that are written to binary log files on this server.  OFF  is the default. Use the  binlog_transaction_compression_level_zstd  system variable to set the level for the zstd algorithm that is used for compression. When binary log transaction compression is enabled, transaction payloads are compressed and then written to the binary log file as a single event ( Transaction_payload_event ). Compressed transaction payloads remain in a compressed state while they are sent in the replication stream to replicas, other Group Replication group members, or clients such as  mysqlbinlog , and are written to the relay log still in their compressed state. Binary log transaction compression therefore saves storage space both on the originator of the transaction and on the recipient (and for their backups), and saves network bandwidth when the transactions are sent between server instances. For  binlog_transaction_compression=ON  to have a direct effect, binary logging must be enabled on the server. When a MySQL server instance has no binary log, if it is at a release from MySQL 8.0.20, it can receive, handle, and display compressed transaction payloads regardless of its value for  binlog_transaction_compression . Compressed transaction payloads received by such 3559 Command-Line Format --binlog-transaction- compression[={OFF|ON}] Introduced 8.0.20 System Variable binlog_transaction_compression Scope Global, Session Dynamic Yes SET_VAR  Hint Applies No Type Boolean Default Value OFF • binlog_transaction_compression