01.MySQL Storage Engine

Source: Internet
Author: User
Tags mysql in

what is a storage engine?The storage engine is a set of programs that is responsible for translating the user's presentation layer (SQL statement) data into the physical layer (database data file) data. MySQL is a plug-in storage engine. What is a plug-in storage engine?MySQL in order to support a more flexible architecture, it put the storage engine into a plug-in, any third party can develop their own plug -in,for the storage engine to complete a bidirectional transformation from the presentation layer to the physical layer, or from the physical layer to the presentation layer. so MySQL has a variety of different storage engines, and the features supported by different storage engines are not the same,Some storage engines support transactions, others do not support, and so on. MySQL supports our free choice of the storage engine used, but Oracle does not support it. Two of the more common storage engines for MySQLThe storage Engine is also known as a table type
TABLE  like ' Table name '\g # can see the property information of a table, and you can see what this table is. Storage Engine

MyISAM Storage Engine (no transaction, table Lock):

MySQL5.5.8 before default storage engineTransaction not supportedMyISAM performance is good, especially suitable for more queries, and less modification of the scene, so it is particularly suitable for data storage. three files per table
. frm: Table structure
        . MYD: Table Data
        . MYI: Table Index
InnoDB Storage Engine (transaction, row lock):MySQL5.5.8 after Oracle acquires MySQL, the default storage engineSupport TransactionsInnoDB is especially suitable for online transaction processing systems (more queries and modifications), such as forums (people post at any time, people see posts)All tables share a tablespace file (not recommended)
Recommendation: A separate tablespace file for each table
. frm: Table structure
. IDB: tablespace (table data and table index)
What to do with the InnoDB engine
# A separate tablespace file per table (recommended) innodb_file_per_table# sets the storage path for InnoDB tablespace files Innodb_data_home_dir ="D:/MySQL5." 5 / InnoDB "

What is db.opt?we found that there is a db.opt file in each database, which is an ASCII text file that defines the character set and collation used by this databaseits content is similar to the following
default - character - Set = GBK default -Collation=gbk_chinese_ci

01.MySQL Storage Engine

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.