Several storage engines in MySQL

Source: Internet
Author: User

Several storage engines commonly used by MySQL

MyISAM:

(1) do a lot of count calculation;

(2) The insertion is not frequent, the query is very frequent;

(3) No business.


InnoDB:

InnoDB Logical Storage structure:
The data for all tables is logically stored in a table space. The tablespace is also made up of the section (segment) area (extent) pages (page).
Pages are also called blocks in some documents.
The table space consists of segments, which are the leaf nodes of the B + tree, and the index segment is a non-indexed node of the B + tree (I understand the non-leaf nodes in the B + tree).
The area consists of 64 contiguous pages, each with a size of 16kb and a size of 1Mb per area. For large data segments, the InnoDB storage engine can request a maximum of 4 extents.

(1) Reliability requirements are relatively high, or require business;

(2) Table updates and queries are fairly frequent, and table locking opportunities are relatively large.


Why is MyISAM faster than InnoDB's query?

InnoDB when doing select, to maintain more than the MyISAM engine much more;
1) data block, InnoDB to cache, MyISAM only cache the index block, which also has the reduction of swap-out;
2) InnoDB addressing to map to the block, and then to the line, MYISAM record is directly the offset of the file, positioning is faster than InnoDB
3) InnoDB also need to maintain MVCC consistent; Although your scene is not, he still needs to check and maintain
MVCC (multi-version Concurrency Control) multi-version concurrency controls


Archive:
Features of high compression and fast insertion archive is well suited as a storage engine for log tables, but only if the table is not frequently queried.


Memory: All of the data is in RAM, the data is processed fast, but the security is not high. If you need fast read and write speed, the data security requirements are low, you can choose Memoey.
It has requirements for the size of the table and cannot build too large a table. Therefore, this type of database is only used in relatively small database tables.

Several storage engines in MySQL

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.