[MySQL] Introduction to the InnoDB File

Source: Internet
Author: User

[MySQL] the InnoDB file introduces a notable feature of MySQL: Its pluggable storage engine. Therefore, MySQL files are divided into two types: files related to the MySQL database itself, one is files related to storage engines. This document describes files related to the InnoDB Storage engine. The tablespace file InnoDB also imitates the design of Oracle. data is stored by tablespace. However, unlike Oracle, Oracle's tablespace is a logical concept, the tablespace in InnoDB is a physical concept. You can set the default tablespace file by using the innodb_data_file_path parameter. All tables based on the InnoDB Storage engine are stored in the file. If you want to create only one tablespace file based ON each form, you can set the innodb_file_per_table parameter to ON. In this way, messages such as table data, indexes, and insert buffering are stored in a separate tablespace file, however, the remaining information is stored in the default tablespace file. The storage mode of tablespace files is shown as follows: 1) table structure definition file (. frm): in MySQL, each table and view have a corresponding one. the frm file is used to define the record table and view. Note: This file is not related to the storage engine and belongs to the MySQL database. 2) default tablespace file (ibdata) 3) Separate tablespace file (. ibd) redo log files are critical to the InnoDB Storage engine and records transaction logs. If the database fails due to downtime, you can use the redo log to restore to the consistent status before the downtime. The redo log of MySQL is similar to that of Oracle. The redo log file group with three redo log files is displayed in a loop, what is the difference between the InnoDB redo log file and the MySQL binary file? There are three main differences between them: 1) First, the range is different. The binary file records all MySQL-related log records, including InnoDB, MyISAM, Heap, and other storage engine logs. While InnoDB redo logs only record InnoDB-related transaction logs. 2) The content is different. The binary file records the specific operations of a transaction, while the InnoDB redo log records the physical changes of each data page. 3) The write time is different. The binary file is recorded before the transaction is committed. During the transaction, redo log entries are constantly written into the redo log file.

Related Article

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.