The difference between MYSQL InnoDB's redo log and Binlog

Source: Internet
Author: User
Tags postgresql


Known as one of the most popular open source database, MySQL is widely used in various scenarios, Alibaba Cloud provides high available ApsaraDB RDS for MySQL with enhanced MySQL service reduced enterprise’s database expenses, and helped enterprises utilize technology to fight against coronavirus.



MYSQL Inndodb's redo log and binlog appear to be very similar on the surface. However, there is a big difference in nature:


First: REDO log is generated at the InnoDB storage Engine layer, and Binlog is generated on top of the MySQL database, and the binary log is not just for the InnoDB storage engine, and any storage engine in the MySQL database will have a binary log for changes to the database.

Second: The content form of the two kinds of logging is different. MySQL's binlog is a logical log, and its record is the corresponding SQL statement. The redo logs at the InnoDB storage engine level are physical logs.

Third: The two logs are different from the point at which the records are written to disk, and the binary log is written only once after the transaction commit has completed. The redo logs of the InnoDB storage engine are continuously written in the transaction, and the logs are not written in the order in which the transactions are committed.

The binary log is only logged when the transaction commits, and for each transaction, it is only logged when the transaction commits, and for each transaction, only one log of the corresponding transaction is included. For the redo logs of the InnoDB storage engine, because their records are physical operations logs, each transaction corresponds to multiple log entries, and the redo log writes for the transaction are concurrent, not written at transaction commits, and the order in which they are recorded in the file is not the order in which the transaction begins.

This article is from the "12024114" blog, please be sure to keep this source http://12034114.blog.51cto.com/12024114/1856661

The difference between MYSQL InnoDB's redo log and Binlog

Alibaba Cloud Hot Products

Elastic Compute Service (ECS) Dedicated Host (DDH) ApsaraDB RDS for MySQL (RDS) ApsaraDB for PolarDB(PolarDB) AnalyticDB for PostgreSQL (ADB for PG)
AnalyticDB for MySQL(ADB for MySQL) Data Transmission Service (DTS) Server Load Balancer (SLB) Global Accelerator (GA) Cloud Enterprise Network (CEN)
Object Storage Service (OSS) Content Delivery Network (CDN) Short Message Service (SMS) Container Service for Kubernetes (ACK) Data Lake Analytics (DLA)

ApsaraDB for Redis (Redis)

ApsaraDB for MongoDB (MongoDB) NAT Gateway VPN Gateway Cloud Firewall
Anti-DDoS Web Application Firewall (WAF) Log Service DataWorks MaxCompute
Elastic MapReduce (EMR) Elasticsearch

Alibaba Cloud Free Trail

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.